How to prevent removal of "deleted" files from the DB? (1 Viewer)

Scythe42

Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    47
    Berlin
    Germany Germany
    In my setup I have symlinks to Network Shares, so all the episodes appear to be local to TVSerives. If the network ressource is not available, episodes get removed from the database on the next update scan. Perfectly OK. But not for my symlink setup...

    How can I turn off the general "automatic removal of deleted episodes" in TV Series?
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    47
    Berlin
    Germany Germany
    I checked the DB itself for a solution...

    What are the Options "removable" and "keep_references" in the table "ImportPathes" doing?

    Looks like I can solve my issue with these, but I want some more input on them. Not in try&error mood tonight :D
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,702
    7,087
    Sydney
    Australia Australia
    Country flag
    Removal is handled automatically, if your drive goes offline e.g. you unplug your USB drive or if your network is down then the local references are NOT removed. Something else is happening in your case, not sure what but it appears to tvseries that the import path is online but files dont exist (this is the only time we remove them, which is perfectly valid I think).
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    47
    Berlin
    Germany Germany
    it appears to tvseries that the import path is online but files dont exist (this is the only time we remove them, which is perfectly valid I think).
    Exactly that is my problem. This "feature" breaks when inside the import path symlinks are used to resources that might not be always be online. The assumption that if an import path is online, everything inside it is online as well is somewhat "flawed".

    So the question remains: how can I turn this behavior off for an import path? Will "removable" and/or "keep_references" will do the trick for me?
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,348
    1,828
    Country flag
    The other question is, why do you try to hold on to symlinks when you can add those as UNC paths to MP-TVSeries and everything will work fine?
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    47
    Berlin
    Germany Germany
    The other question is, why do you try to hold on to symlinks when you can add those as UNC paths to MP-TVSeries and everything will work fine?
    Poor man's distributed file system :) I'm not holding on to them, I upgraded to them!

    In fact the problem will arise with any distributed file system implementation where the import path is online but directories or files in it might not. Try it out with AD's DFS. It will have the exactly same issue.

    Here is the long story:

    The symlinks allow me to have one single import path and move resources around the network or harddrives as I please with no impact on TVSeries. This is user friendly (my GF would kill me if she had to constantly play with the Config Tool.) With Fuse I even can do more great stuff.

    Some ressources are also located in the cloud or archived and cannot be imported or accessed by TVSeries itself. They will be made online once a file in the directory is accessed. From an application level it looks like one local filesystem or one remote share, even though it isn't. Resources inside it can go on- and offline by accident or on purpose. Any kind of automatic deletion screws things up very bad in such an advanced setup.

    I also insert new episodes directly into the database as part of the post processing from sickbeard to make them available at once without any user interaction or delay. The local scan just updates the artwork later. In fact I will try to "virtualize" the DB in the future. Still need to investigate what the best approach is and if it is even possible.

    Also some ressources are encrypted with TrueCrypt and require an USB Token to be inserted in the HTPC to decrypt then. Think very advanced and actually working parental controls here. No one can access such files without a token.

    I even have replication over VPNs setup to supply some of my closest friends with a "subscription service" to the TV shows of their choice. In addition some shows are held locally and older ones (depending on disk-space) are automatically exchanged to links to my archive drives or cloud ressources.

    I go even further in my setup. I "virtualized" my MP install with symlinks. I can switch between a production, test, development and SVN environment with a single mouse click. Also the DBs and Config Files are symlinks as well depending on who is the user for MP. The setup is standard and the paths are always configured the same for every environment and every user. Think support here. All by just keeping the content inside the poor man's distributed file system flexible and have "trigger actions" setup when specifics folder on my network are accessed or updated.

    I can simply switch out anything real easy without MP or the plugins even noticing while keeping a standard setup and no one needs to change the configuration when something on the network changes. I can work on the network, move resources, replicate them and my GF or some friends at a different location don't have to adjust their configuration when I completed some work. Also different people have different shows in different languages listed in TVSeries depending on their preferences. Still working on a "on-the-fly config reload" while MP is running...

    As you ca see I have perfectly valid reasons to use a DFS based on symlinks and Fuse in my setup.

    To sum it up once again:

    Ressources inside an import path that itself is considered online by TVSeries might not be available for "external" reasons when you use a distributed file system. Therefore I want to turn the deletion behavior off. Can this be done with some of the settings in the DB on the import path? Or do I have to comment out the deletion in the source and recompile it just to turn this behavior off?

    Edit:
    Also a simple mountvol (same a mount under Unix) will have the same problem with mounted Shares to a directory inside an import path. Mountvol exists since Windows XP...
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,702
    7,087
    Sydney
    Australia Australia
    Country flag
    We don't have the option keep local files anymore. We could however add an advanced option for this case.
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    47
    Berlin
    Germany Germany
    That would be awesome!
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    HomeY Confluence Spam prevention enabled Online Facilities 0
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    J Mediaportal Standby prevented by Mediaportal system/ active ports General Support 13
    Stéphane Lenclud [solved] TV Server Service preventing sleep General Support 18
    HTPCSourcer [Evaluate] Remove obsolete menu entries from "MP2 TV Configuration" MediaPortal 2 0
    R [solved] Moving pictures importer wont add files from a removable drive. Is there a work around ? Moving Pictures 8
    HTPCSourcer [Evaluate] MP2-Updates do not remove the GUID of previous installs MediaPortal 2 13
    stirlinghart [solved] Remove recording started & finished pop ups General 2
    D Remove "Old" client names from Service Monitor? General 5
    stirlinghart How to remove menu overlay General 11
    morpheus_xx Was this spam? I deleted it... Online Facilities 4
    R [solved] Unable to delete single recording General 2
    P Recordings not showing up unless re-imported and not possible to delete General 0
    R [solved] MP will not delete recordings that are on NAS Television (MyTV frontend and TV-Server) 23
    N [Finished] [MP2-781] Enable one-click deletion of grouped TV recordings MediaPortal 2 70
    G MP 1.21 TVserver race condition when cant delete recording triggered by episode management General Support 0
    N [Finished] MP2-803 - Delete full series doesn't work when viewing a program in the extended schedule screen MediaPortal 2 12
    N [solved] Cannot delete recordings from remote client MediaPortal 2 32
    G [solved] How do you delete media in Mediaportal2? General 14
    R Mediaportal will not delete Recorded TV items that do not exist MediaPortal 1 Talk 0
    Frans Nijhuis [further infos missing] Deleting all TV channels and all channel groups in "MP 2 TV configuration" fails 2.2 Archive 1
    H [fixed] Series programming/deleting 2.2 Archive 1
    H [Finished] [MP2-781] Delete a Folder in TV-Recordings Archive 7
    krebbi [solved] Delete Media Files via Context Menu General 8
    Similar threads
























    Top Bottom