FAQ  •  Register  •  Login

Library Update For Removable Devices

<<

anniebody

Serviio lover

Posts: 78

Joined: Sat Nov 19, 2011 12:28 am

Post Fri Aug 23, 2013 9:49 pm

Library Update For Removable Devices

Using Serviio with no automatic updating for media on SATA drives on removable caddies means I have to manually force refresh every time the caddy is re-inserted. Serviio should check device availability before changing the library to nothing for a device that is not currenlty plugged in.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Aug 23, 2013 11:49 pm

Re: Library Update For Removable Devices

That is not possible because unplugged state is the same as a removed folder / mount point. So to automatically remove deleted files this has to be done.
<<

nickski

Streaming enthusiast

Posts: 28

Joined: Thu May 10, 2012 3:39 pm

Post Sat Aug 24, 2013 8:01 am

Re: Library Update For Removable Devices

This has been requested before http://forum.serviio.org/viewtopic.php?f=3&t=7227&hilit=nickski

It still catches me out occasionally - and it makes a nonsense of the "last added" function.

Its odd that Serviio only has the concept of "exists" or "doesn't exist" and can't conceive "offline"!
nickski
Render: Panasonic Viera TX-L42E30B + DMP-BDT210 + Jelly Bean 4.1 Tablet + Onkyo TX-NR616 | Server: Intel i5 Win 7 ult x64 | NW: Homeplug @ 175 Mbps
<<

IronGibbet

Serviio newbie

Posts: 12

Joined: Mon Oct 14, 2013 5:05 pm

Post Tue Oct 15, 2013 4:05 pm

Re: Library Update For Removable Devices

Hi,

wouldn't it be possible to add an extra checkbox with a bool behind it after the "Scan for file additions and updates"? When it's a removable device check if the whole device is gone and for that time skip the updates for all folders on that drive/device.
In my case it takes a bit of time to readd about 1 TB of videodata three to four times a week.

Greetings IG
<<

bobsmo

Serviio lover

Posts: 65

Joined: Thu Dec 20, 2012 12:06 pm

Post Tue Jan 07, 2014 4:28 pm

Re: Library Update For Removable Devices

+1 for me as well here....still gets me every once in awhile.....can't it just be that when there is no regular library refresh ( so Keep Library Automatically Updated is NOT checked), it just does not do the check upon start up?
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Tue Jan 07, 2014 11:04 pm

Re: Library Update For Removable Devices

zip wrote:That is not possible because unplugged state is the same as a removed folder / mount point. So to automatically remove deleted files this has to be done.
In fear of treading in waters I know nothing about.... couldn't Serviio test for the existence of the root of the shared folder prior to commencing the scan of that individual shared folder and its subfolders (ie. the existence of the shared folder as it is listed in Serviio Console, Shared Folders), and if the folder does not exist, assume it has been unplugged and skip the scan (for this shared folder only) this time.

The concerns are:

  • that a permanently removed drive/deleted shared folder will never have its media removed from the library. This can be overcome if (and this may already be the case) all relevant library entries are removed when a shared folder is removed from the library ie. if the user permanently removes a drive/shared folder, they must also remove the shared folder from the library to also remove its entries;
  • users will still appear to be able to access media from their renderers (the browse function will still list the unavailable media I believe?). When they try and play the media it will fail - this may confuse some people (but no worse than having items disappear as is the case now).
  • if the drive is disconnected after the scan starts then the media will be removed (as is the case now).
Don't see that any of these negatives are insurmountable, but it does depend on java's ability to test for the existence of the shared folder prior to the scan. This scheme works on the theory/assumption that users won't normally physically delete a shared folder at its root (they may delete subfolders, but under this scheme cannot delete the root without also deleting it from the library).
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Jan 09, 2014 5:45 am

Re: Library Update For Removable Devices

So if your drive is under /mnt/drive I could check for /mnt but that will not tell me if the drive is attached or not. It would work on Windows, probably
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Thu Jan 09, 2014 6:16 am

Re: Library Update For Removable Devices

Not a linux user but if the shared folder was "/mnt/drive", couldn't you check for "/mnt/drive"? ie. check whatever the user has listed as the "root" of their share - if they share "/mnt/drive" then test at that level, if they nominate "/mnt/drive/folder/folder" as there shared folder, test at that level, etc.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

jsbbs

Serviio newbie

Posts: 5

Joined: Tue Jan 07, 2014 12:12 am

Post Mon Jan 13, 2014 5:23 am

Re: Library Update For Removable Devices

I'd be keen on this too!

I've mapped my NAS volumes as shared folders in serviio (my movies and pictures are scattered on devices and volumes for redundancy... after serviio, my next project will be a big unRAID server lol!).

When I turned off my NAS, serviio 'cleared' out the contents. And when I turned the NAS back on, serviio progressively re-added the movies and photos into its list. That wasn't good for the WAF (wife acceptance factor).

I concur with DenyAll's comments earlier and think that if the 'root' of the share doesn't exist, then skip the scan. Maybe even trick the client (media renderer) that there is no content available but don't remove any information from serviio's datastore.

If the user doesn't figure out that something's wrong, then the problem might be the user lol!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jan 13, 2014 5:51 am

Re: Library Update For Removable Devices

DenyAll wrote:Not a linux user but if the shared folder was "/mnt/drive", couldn't you check for "/mnt/drive"? ie. check whatever the user has listed as the "root" of their share - if they share "/mnt/drive" then test at that level, if they nominate "/mnt/drive/folder/folder" as there shared folder, test at that level, etc.

but then if you remove /mnt/drive/folder Serviio would not detect it as removed. Unless I add additional checkbox somewhere, which might make the UI even more confusing.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Mon Jan 13, 2014 7:18 am

Re: Library Update For Removable Devices

zip wrote:but then if you remove /mnt/drive/folder Serviio would not detect it as removed.
Yes that's correct. The scheme relies on users not physically removing the folder on the HDD without also doing so in Serviio Console, Shared Folders. They could remove files and sub-folders as they do now, but cannot delete the main folder (as listed in the Shared Folders) without also removing it from the Shared Folder listing.

Realise that this scheme is a compromise - it relies on user behaviour which is never reliable :) - but I think it could present a way to support removable drives (albeit not perfect). I think that it would be rare that a user would delete/rename the main folder and also not the listing in the Shared Folder, but if they do, the impact is imo less than large sections of a library disappearing because a drive is temporarily off-line. A warning in the log could also be used to show where a shared folder is not found, and ignored in the library update.

Anyways, just an idea....
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Mon Feb 24, 2014 7:37 pm

Re: Library Update For Removable Devices

Can you manage that situation writing an hidden file in the root of shared folder? (obviously in folders with RW permissions) Something like a .serviio file, in the same way some software repositories do (live .svn or .git). Updater thread can check this file to identify a disconnected shared path.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Feb 24, 2014 8:46 pm

Re: Library Update For Removable Devices

That would require to have write access, which is not always the case.
<<

vbivona

Serviio newbie

Posts: 11

Joined: Fri Feb 24, 2012 2:50 am

Post Mon Feb 24, 2014 9:02 pm

Re: Library Update For Removable Devices

This sounds complicated. How about this:

Serviio adds and removes items when it updates the library. Could you separate those functions similar to the way XBMC works. In XBMC, update video library just processes additions. Clean video library removes items that don't exist. If the functions were separate, I wouldn't lose my last added and watched items on a somewhat regular basis. Of course, I would have to make sure all disks are accessible before I use the clean library function. I could live with that.

The way things are right now, I frequently lose the flag that indicates the last TV episode in a series I've watched (and my last added list has become almost useless because it removes everything when the disk is not accessible then it adds them back).
<<

filjander

Serviio newbie

Posts: 7

Joined: Mon Feb 03, 2014 9:53 am

Post Mon Mar 03, 2014 6:51 pm

Re: Library Update For Removable Devices

zip wrote:That would require to have write access, which is not always the case.

Well, as I understand, the only actual procedure to use external hd and avoiding the library cleanup each time i disconnect those, is keeping refresh checkbox unchecked, then, every time i add a file, i need to select checkbox, save (this also triggers a library update) then, after update finished (as i can see from status popup), ri-deselect checkbox and save.

Is it possible at least to add a button to force refresh on every single mount point, without the whole checking/unchecking thing? Thanks.
<<

Iveky

User avatar

DLNA master

Posts: 329

Joined: Thu Jan 31, 2013 5:17 pm

Location: Split, Croatia

Post Wed Mar 05, 2014 5:23 pm

Re: Library Update For Removable Devices

If I change data in (xbmc) nfo file, when they will reflect changes in database?
I pressed 'refresh' but still old name appears on tv?
how to force to reread data?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Mar 05, 2014 7:32 pm

Re: Library Update For Removable Devices

Iveky wrote:If I change data in (xbmc) nfo file, when they will reflect changes in database?
I pressed 'refresh' but still old name appears on tv?
how to force to reread data?

It will work if you have the Check for updates of currently shared files selected.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 40 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.