mike_sendrove wrote:Does this make sense?
Sorry Mike, I'm not trying to be difficult and thanks for justifying your situation! But there are flaws with what you want and how the script operates.
There is no way the script can determine that it's deleting the empty folder on just
one level in such as
/Movie/Path/Amazing.Movie/ or
two levels in /TVShows/Path/Amazing.Show/S01/. So to expect different results for your TV Shows vs. your Movies unfortunately isn't going to happen I'm afraid.
KODI (XBMC), Synology setups, Plex, etc all know how to handle situations where an entire video is removed that it used to access (this is especially the case in your situation where you're using these very same tools to remove the video). These apps specifically only care about the absolute path to the video file and meta information. They operate on the fact the video is either there, or it isn't. If the video is gone; it doesn't care if the directory is there or not afterwards.
Not to mention that all of NZBGet's tools/scripts it uses or passes off it's content to such as VideoSort.py (NZBGet Script), CouchPotato, SickBeard, Sonaar, etc will all automatically recreate these (once empty) directories anyway when another video gets downloaded that belong in it. The automation is already there; you don't need to manually manage the directories yourself or leave it around.
In your case (wanting directories to remain present but empty), you might as well just leave all the meta information in the directories too and just not use this script at all. Especially since you're managing the directories manually anyway. The feature you're proposing is only going to save you 500K of disk space tops (a few jpegs) on your
xTB hard disk (0.000001% of it).
Alternatively, have a look at the TidyIt setting entitled
ProcessMinAge. This prevents directories from being handled until they haven't been manipulated or touched for more then this defined time (defined in seconds). If you increase this to a value something such as
259200 (3 days in seconds); the script will only begin looking at your manually managed directories then; this might work perfectly for you! You could also set it really high if you want to too such as
691200 (8 days). Feel free to keep setting it higher then that too (60 x 60 x 24 x
days)