FAQ  •  Register  •  Login

API: Library Refresh

<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sun Nov 17, 2013 12:21 pm

API: Library Refresh

Hi zip,
I am working on customising the library refresh using my WinHelper tool. A couple of questions if I may:
  • If an app forces a library refresh using the configuration API (posts a /rest/action/forceLibraryRefresh) and then does so again before the first refresh is finished - what happens. Does it:
    1. Ignore the second request
    2. Start the refresh process from the beginning (terminate current refresh process and start again)
    3. Queue the second request and process it once the first refresh is finished
    I believe (from what I have observed) its the second option, but better to check. My post is really for the next question....
  • If a refresh begins, and the scanForUpdates for a particular folder is subsequently changed (before the refresh is finished) does it affect the currently running refresh process? For example, if the scanForUpdates for folder C:\XXX is true, and then a /rest/action/forceLibraryRefresh is issued (starting the refresh process) and then very shortly after, the scanForUpdates for folder C:\XXX is set to false is C:\XXX included in the scan? (ie. does Serviio take a snapshot of the library scanForUpdates status at the beginning of the refresh process or does it check as needed throughout the process?).
FYI, I am endeavouring to use the WinAPI to actively monitor changes to the shared folders and, on detecting a change, refresh the library. I have safeguarded somewhat against multiple file file changes triggering multiple refresh requests but it can still happen to a limited extent - once a minute maximum (relates to the first question). I am also trying to cater for removed drives - this involves setting the scanForUpdates for the shared folder on or off if the drive is present (relates to second question).

Any concerns or issues you foresee would be greatly appreciated.
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: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Nov 17, 2013 9:40 pm

Re: API: Library Refresh

as or 1) - you are right, second is correct
as for 2) - it loops over the shared folders and makes the check just before it starts processing the folder (so no snapshot at the beginning)
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sun Nov 17, 2013 11:29 pm

Re: API: Library Refresh

Thanks for the prompt response. Greatly appreciated.
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.

Return to Third-party tools integration

Who is online

Users browsing this forum: No registered users and 15 guests

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