problem with deleted doubled episode (1 Viewer)

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    @ltfearme perhaps that is something to look for at code level? Check to see that when a series is deleted from database via GUI/etc that each episode/season is deleted first. Or recreate JimCatMP scenario above, locate the orphaned file references and create like a cleanup SQL query that can be run as a quick maintenance check upon startup of plugin (or config even).

    Just thinking out loud.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I will try find the time to look at the duplicate file support for next release. The Delete logic is pretty complicated so need to find half day to debug and sort it out.
     

    JimCatMP

    Documentation Group
  • Team MediaPortal
  • April 1, 2010
    654
    285
    Leeds
    Home Country
    United Kingdom United Kingdom
    Not sure how to put this SQL statement (can manage select & delete, have problems much beyond that), but...

    1) Create SeriesID list from local_episode (ie select distinct SeriesID from local_series).

    2) Walk the list and delete from local_episode where SeriesID = listitem and local_series.ID(listitem) == NULL (ie no such series).

    On my Atom based system, with 140 odd series and 4500 or so episode, a simple delete from table command, removing a single episode takes several seconds - something I would not want to run on plugin start up for any complex request, but certainly something I would run from config.

    Cheers - JCMP

    PS - wrote this and was ready to post BEFORE I saw input from ltfearme - and yep, I don't think it's trivial to do, and certainly not to do well.
     
    Last edited:

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I think I fixed all the damn delete bugs, if you want to test find attached a test dll.

    I have tested a quadrillion scenarios so hopefully much better now, deletes from config are much better and will refresh UI esp for deletes from disk.

    Deletes from database are not allowed from episode view if you try to delete a duplicate episode, it will force you to delete from disk until you have removed them all. There is even support for duplicate double-episodes :eek:

    Deletes from Series/Season views can handle duplicates so dont be afraid any more to use all available options.

    If you want to give me a headache please report back any scenarios that dont work, but please keep discussion related to deletion logic.
     

    Attachments

    • MP-TVSeries.rar
      531 KB

    Users who are viewing this thread

    Top Bottom