Directory Watchdog - Background file monitor service to initiate auto update library? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: Directory Watchdog - Background file monitor service to initiate auto update library? (/showthread.php?tid=66348)
- tronics - 2010-01-17 18:13
Edit: removed apparently irrelevant info
- althekiller - 2010-01-17 20:07
That's basically what the current scanner does. Which, consequently, isn't what's being discussed here.
- AnalogKid - 2010-01-17 21:29
I think for each OS, we know how to detect a change... that's pretty simple, but what we want is a very efficient (preferably 'event driven') solution to detect changes.
External 'watchers' could simulate event driven by polling / regular interval scans... (i.e. XBMC wouldn't know) OR they could utilise the host OS services to know when a change had occurred (or even use both, cos you just can't trust those damn OS folks sometimes!).
The point is, for many reasons, most folks want to offload this work to something outside of XBMC. 90% of users are getting by perfectly well by hitting 'scan'... so the remaining 10% who really need it, or those just who'd just 'like it' can develop their own watchers, however they please. The best ones will rapidly get distributed throughout the community... just like all the other external tools do.
You can always make a case for XBMC doing more... I know I could, but there's a limit too. There's not enough developers and a hard line has to be taken with some features (otherwise XBMC would be incorporating bulk file renaming, web browsers, tea making facilities and even something as mad as playing back media!).
I reckon an external watcher would be a couple of days work for a good one, and half a day for a crude one.... no more than a couple of Kbytes and easily sent around the community... (a heck of a lot easier than building it into XBMC). Eventually it might end up part of XBMC, but for the moment, external's the fastest, quickest route (IMO).
- CrashX - 2010-01-17 22:17
It does keep the library up to date so I wouldn't say it is total waste.
How about this ?
We merge File View and Library View together to form one unique view. Library view doesn't detect any filie/directory changes but file view does. If file/diriectory is change, it will trigger a library update for that particular file when you are browsing your library. This also handles the case, where directory/file isn't added to the library because no data is available ( Scrapper can't find anything ).
- jmarshall - 2010-01-17 23:25
That's the plan already, though there's still things like we'd like to be able to shoot up notifications or whatever when a new movie is available.
- pecinko - 2010-01-18 01:34
CrashX Wrote:We merge File View and Library View together to form one unique view. Library view doesn't detect any filie/directory changes but file view does.
Add to that auto-tagging by subfolders & add to DB by folder/file name in case scraper fails and count me in.
Classic Cron Solution using curl - jmagilto - 2010-01-23 00:04
as root user
as xbmc user
create file /home/xbmc/updtV
make it executable
create file /home/xbmc/updtM
make it executable
(these settings update the Video each nite at 12:55am and the Music at 2:55)
Hope this helps someone
Automatic library management? - pashdown - 2010-01-26 19:26
With an active cache of shows rolling over, repeatedly updating the library and cleaning removed videos out becomes a real chore. Is there a better way to transparently update and audit the library? A different database system, or a centralized database running on NAS?
Clarification of above. - pashdown - 2010-01-27 06:04
Looks like my post got moved to this thread.
I know how to use cron, but that isn't what I'm looking for. Both of my XBMC boxes are suspended when they aren't in use. It would be nice if instead of maintaining two separate unsync'ed library databases, there was an option to run a centralized back-end database (ala mythtv) on my fileserver (which is on all the time) that they both pointed to.
- semi- - 2010-01-30 05:14
This is not directly related so maybe I should be making a new post, but I have a slightly different approach to this problem:
Updating library on startup works fine for a lot of people, but if you leave xbmc running 24/7 on a HTPC it isnt very useful. Would it be possible to add in a "Scan for updates when coming out of idle" (as in, when the screensaver goes away) feature too?
I know someone else already mentioned doing it while idle which is also interesting, but this seems like the easiest and cleanest way.