How to delete entries in tvseries for removable drive? (1 Viewer)

famewolf

Portal Pro
June 7, 2009
145
11
Home Country
United States of America United States of America
I have a drive F with a tvshows dir.....I copied all the files to a new Drive I in tvshows directory.....drive F is no longer on the htpc...both drive paths were marked as "removable" .....f:\video\tvshows is no longer listed as a path to import from but I continue to have "ghost entries" that show up in red for the f path.....for instance the tv series John Doe will have two entries for each episode, one in white..one in red....one on I drive and one on the missing F drive...how do I get rid of the "ghost entries"? I thought removing the import path would make it get rid of any reference to the drive in the database. In music it has an option to rescan and remove any non valid links but I was unable to locate anything similar in the mp-tvseries plugin.
 

famewolf

Portal Pro
June 7, 2009
145
11
Home Country
United States of America United States of America
Hi

Simply select the "ghost entry" in the list, right click and "delete from database"


Thats fine in theory..now imagine 200 tv series with 1-9 seasons each and a duplicate of every single one of them.
 

famewolf

Portal Pro
June 7, 2009
145
11
Home Country
United States of America United States of America
Delete the database and rescan?


Yeah I figured that was gonna be my final solution so I'll wait until they release the new mediaportal 1.1 and it will be part of my "clean install" of it. Thanks for the reply.
 

alexeiei

MP Donator
  • Premium Supporter
  • April 8, 2009
    27
    4
    Barcelona
    Home Country
    Spain Spain
    Seriously, you must be able to select 2 or 3 duplicate series per second, so selecting 200 series is about 1 minute or so... I think thats the only way.

    By the way, 200 series * 5 seasons * 10 eps by season * 300 Mb per chapter = 3000 TB.... :eek:

    How many hdd do you spend?
     

    famewolf

    Portal Pro
    June 7, 2009
    145
    11
    Home Country
    United States of America United States of America
    Seriously, you must be able to select 2 or 3 duplicate series per second, so selecting 200 series is about 1 minute or so... I think thats the only way.

    By the way, 200 series * 5 seasons * 10 eps by season * 300 Mb per chapter = 3000 TB.... :eek:

    How many hdd do you spend?

    1.5TB was $90 a while back so it's not that outrageous. Got 3TB in USB storage and 1.5TB in internal and if necessary can use network storage. I'd say the average of season's is closer to 3. I like the idea of reloading the database when I do the required clean install of 1.1....till then I'll just skip over the red entries.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Seriously, you must be able to select 2 or 3 duplicate series per second, so selecting 200 series is about 1 minute or so... I think thats the only way.

    By the way, 200 series * 5 seasons * 10 eps by season * 300 Mb per chapter = 3000 TB.... :eek:

    How many hdd do you spend?

    1.5TB was $90 a while back so it's not that outrageous. Got 3TB in USB storage and 1.5TB in internal and if necessary can use network storage. I'd say the average of season's is closer to 3. I like the idea of reloading the database when I do the required clean install of 1.1....till then I'll just skip over the red entries.

    You could solve it with SQL queries.

    But it's not for the faint of heart, and queries can run rather complex due to the multiple tables containing relevant info.

    Your main target is the `local_episodes` table, which you find a match on easy, because this is where your 'F:\' reference is stored in the EpisodeFilename column. But these rows have to be matched with the relevant rows stored in other tables. Just removing the rows from the `local_episodes` table alone might lead to unpredictable results.

    More on related tables, is explained at: Delete (SQL) - Wikipedia, the free encyclopedia

    Be warned though the example in that article talks about triggers, which in this case do not exist, so when you delete the rows from `local_episodes` the other tables remain unchanged. But the article itself does explain the risks involved with loss of integrity.

    The complex SQL queries I use in MySQL to join multiple tables together in a single query fail on SQLite, so I'll give you the easy one to only delete the rows from local_episodes table.

    SO USE AT OWN RISK: DELETE FROM local_episodes WHERE EpisodeFilename LIKE '%F:\%';

    Just make a backup of your 'TVSeriesDatabase4.db3' file, run the SQL query and see if it solves things. If things go wrong, at least you can restore the backup and wait till you are ready for your 'start fresh' upgrade to v1.1.
     

    Users who are viewing this thread

    Top Bottom