Page 1 of 1

No automatic library deletion of media for offline devices

PostPosted: Tue Aug 28, 2012 10:49 am
by nickski
My server has drive caddies.
Recently during testing other apps on the server, I've inadvertently started the server without my media drives enabled.
In this situation Serviio automatically removes media file entries from its library for all media it can no longer detect. As I have all my audio collection as well as my movie collection catalogued, it can take Serviio a mighty long time to rebuild its library.

I also have a networked attached PVR in another part of the house. If this is in standby mode (network offline) when Serviio is running, Serviio again de-catalogues all media.

I like the automatic update function of the Serviio library so would not want to switch it off completely.

Would it be possible to assign a home device id to each media file entry in the Serviio library - and then only automatically delete media entries from Serviio's library if the media file is not found AND its home device is online.

Re: No automatic library deletion of media for offline devic

PostPosted: Tue Aug 28, 2012 10:48 pm
by zip
For what you need I think uncheck the check boxes in the orange box as shown here: http://wiki.serviio.org/doku.php?id=ser ... _explained

Re: No automatic library deletion of media for offline devic

PostPosted: Wed Aug 29, 2012 12:30 am
by jhb50
Yes, that's what I do for my standalone drives. Only activate them when I want to cache new files. Nothing gets removed now.

Re: No automatic library deletion of media for offline devic

PostPosted: Thu Sep 06, 2012 2:55 am
by gavinc
I agree with nickski, it would be preferable to not delete files during an update and to add a "clean" function that does a full update (including delete) when you activate it. It isn't very often that you remove anything from your library (at least for me).

Re: No automatic library deletion of media for offline devic

PostPosted: Sun Sep 09, 2012 8:53 am
by nickski
Well ... after hitting this issue yet again ... I've written my own start-up script for Serviio that ...
Checks for online availability of a small list of folders and if one if offline it pops up a warning message and waits for a response (ABORT/RETRY/IGNORE). If IGNORE is selected then an automatic backup of the Serviio library is performed before going on to start Serviio.

I might put a timeout on the pop-up message - still undecided on this.

Re: No automatic library deletion of media for offline devic

PostPosted: Tue Oct 29, 2013 1:11 pm
by pur_berger
Hm - I would like to push this - as I came across this issue with my NAS - in terms of erergysaving I have set it to only operate in a specific timeframe. As serviio is on all teh time and autoupdate is checked it removes teh whole libraray of course. On teh other hand I need the updae as there are files added on a regular base (collecting Animes).

So - any idea if it is possible to - at least with Networkshares - let serviio first check the avalibility and only if the set networkpath is reachable it is going to do the search for Update?

Re: No automatic library deletion of media for offline devic

PostPosted: Tue Oct 29, 2013 3:38 pm
by zip
The only solution would be not to remove files from the library when the shared folder is marked with 'don't update metadata' (blue round arrow in the console). But it would then not remove files even if they are meant to be removed.

There is no way to distinguish the type of the drive and if it's on or the file path is missing (in Java).

Re: No automatic library deletion of media for offline devic

PostPosted: Wed Oct 30, 2013 8:11 am
by pur_berger
Will try this - but doesn't this setting mean that also new files are not going to be added? Is a posible way to solve this not to automatically remove files not found anymore but to have a secondary option to "remove records without physical file" - so it will only do a cleanup when you want it too?

Re: No automatic library deletion of media for offline devic

PostPosted: Wed Oct 30, 2013 9:12 am
by will
The problem is related to not knowing the difference between someone deleting a folder and the folder not being there because the drive/share it is on is unplugged.

The only thing I can think of is if the root of the folder that was added to the console e.g. D:\Movies does not exist, then assume (with a single option in the library section to turn this on (so off by default) i.e. 'Do not remove content from the library when the entire shared folder no longer exists') that the drive that it is hosted on is not available, rather than the folder has been deleted. If the user really did delete D:\Movies, then they can then remove it from the console.

Re: No automatic library deletion of media for offline devic

PostPosted: Wed Oct 30, 2013 9:34 am
by pur_berger
I have other systems running with the option to scan for records without phyysical files - so basically it does the same. I understood that teh issue is also that serviio can't check for teh share availibilty so it won't see a difference between "not here" and "deleted". Therfore for me - never delete unless it is recommended by the user - would be the logical way to go. Something like an option to each share in additin "automatically remove record"