Directory Watchdog - Background file monitor service to initiate auto update library? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222) +--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9) +--- Thread: Directory Watchdog - Background file monitor service to initiate auto update library? (/showthread.php?tid=66348) |
- AndyE - 2010-01-17 AnalogKid Wrote:Seems to me that most of the solutions are working on a 'pull' solution. (No I don't mean POLL).... Isn't it sort of pointless having architecturally clean code that doesn't actually provide anything? This solution still means someone has to write the apps that send the inotify and Windows/OSX equivalent notifcations to XBMC. And who is going to write and maintain those? EDIT: Just to be clear, my point being if they are considered community apps, community apps with poor quality or performance may reflect badly on XBMC, with the XBMC devs not having any real control over it - althekiller - 2010-01-17 AndyE Wrote:And who is going to write and maintain those? What makes you think we want to? - AndyE - 2010-01-17 althekiller Wrote:What makes you think we want to? That's exactly my point - jmarshall - 2010-01-17 If they don't work, we won't distribute them, simple as that. If a user has to go elsewhere to find something then they already know it's not supported. - AnalogKid - 2010-01-17 The point is, the XBMC team don't really want to do this, not unless there was a totally compelling reason and simple cross platform implementation... So, as a concession, those that REALLY do want this feature would be free to implement a solution that wouldn't compromise XBMC i.e. Develop their own external monitor. Should anybody develop a superb monitor that miraculously convinces the XBMC team of the error of their ways, then I am sure they would consider incorporating it into the XBMC core. Until then.... Since I'm not gonna be doing any coding for XBMC, I either put up with what I get, or implement workarounds externally... I don't see why that couldn't extend to folder watching (providing there's enough of a hook to notify XBMC of a change, or force a library update) For me that's a fair solution - tronics - 2010-01-17 Edit: removed apparently irrelevant info - althekiller - 2010-01-17 That's basically what the current scanner does. Which, consequently, isn't what's being discussed here. - AnalogKid - 2010-01-17 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 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 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 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 as root user Code: apt-get install curl as xbmc user create file /home/xbmc/updtV contents Code: #! /bin/bash make it executable Code: chmod 755 /home/xbmc/updtV create file /home/xbmc/updtM contents Code: #! /bin/bash make it executable Code: chmod 755 /home/xbmc/updtM (these settings update the Video each nite at 12:55am and the Music at 2:55) Code: crontab -e Code: # Update Video and Music Libraries each nite Voila. Hope this helps someone Automatic library management? - pashdown - 2010-01-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 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 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. |