Page 1 of 1

Inhibiting cleanup of library for unmounted removable drives

PostPosted: Tue Nov 09, 2010 9:31 am
by patters
For media that's on removable drives would it be possible to set the library cleanup thread to only start removing library entries if that particular drive letter is mounted?

I just noticed my PC was working quite hard - it was Serviio. I checked the log and saw it was going through removing a ton of stuff from the database because my external HD was powered off.

Re: Inhibiting cleanup of library for unmounted removable drives

PostPosted: Tue Nov 09, 2010 9:50 am
by zip

Re: Inhibiting cleanup of library for unmounted removable drives

PostPosted: Wed Nov 10, 2010 8:21 pm
by patters
Thanks, but your fix there is to enable/disable updates per resource. Let's say the worker thread polls files in the library and realises that files on say G:\movies are missing, so it wants to remove them from the database. I'm suggesting that first it checks if there is a volume called G: mounted at all. If there isn't, then I suggest it should not delete any orphaned content on that whole drive (even from other library folders) since it's most likely a removable hard disk.

Re: Inhibiting cleanup of library for unmounted removable drives

PostPosted: Wed Nov 10, 2010 9:23 pm
by zip
Not sure how this would work on Linux or Mac, as they probably mount the external devices as:

/mnt/something
/Volumes/something

in which case checking for the first path element would not work. What I propose is run the indexing once (for remote repos) and then if the drive is disconnected it won't reindex automatically - you can still force the refresh manually.