• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 56
[RELEASE] Library watchdog
#1
Watchdog is a service that will monitor your media sources and update the library when new files are added. Optionally, the library can be automatically cleaned when files are deleted. Update is instantaneous. Available from the official add-on repository

Report issues in this thread. Please always provide complete debug log. See Log_file (wiki) on the wiki for how to. If you do, it will be looked and I will try to help.


Known Issues

Continuous scanning/cleaning
If this happens you most likely have an application running that continuously reads and/or deletes files in the media source. Remove the offending application or remove the folder from media sources in xbmc. Normally, downloading applications and such should not cause this as all file modifications and creation/deletion of non-media files are ignored.

"Failed to watch x" on Linux
On linux there is a limit on how many folders you can watch simultaneous. If your media sources contains more subfolders than the limit (usually 8192) it will fail. Select "Polling" under "Method" in add-on settings, or increase the inotify watches limit.

Other addons slow to open/won't open at all
Issue in xbmc http://trac.xbmc.org/ticket/14212 Only known to affect Polling
Fixed in Kodi 15.0 Isengard.



FAQ

If using polling, will it hog the disks and prevent them from spinning down
No. When there's nothing being written to the drives, the OS will usually cache the entire directory structure. If for some reason disk activity persist, you might want to look into increasing the cache space in you OS.

Polling methods:
If you are experiencing performance issues you can select another method for network shares. Here's an explanation of the different polling methods you can choose:

Depth inf. (default): performance dependent on total number of directories and files. Will detect everything, also whether a file was added or removed.

Depth 1: cpu/network cost ~0. independent of number of files
Code:
./media source/
    folder a/  <-- detected (will always scan and clean (if enabled). unknown if it was added or removed)
        folder b/  <-- not detected

Depth 2: performance depends on number of directories and files in top folder (media source) only
Code:
./media source/
    folder a/  <-- detected as new
        folder b/  <-- detected (will always scan and clean (if enabled). unknown if it was added or removed)
            folder c/  <-- not detected
Reply
#2
Thanks! Seems to be working fine for me. Running Ubuntu 12.04 with a RAID5 for my media and a MySQL DB. All of this is local on the same box.
Question though, you said Movies, I assume it does TV Shows as well since they are both in the same DB? What about Music?

EDIT - Answered my own questions, it added the TV show fine too. Music was not updated though. Any chance of getting that to work?
Reply
#3
Yeah, it works just with videos for now, but i'll add music support too..
Reply
#4
Cool thanks!
Reply
#5
any chance that remote shares could be incorporated? my hard drives are on the same computer as my main xbmc install... i just set them up as shares for future xbmc installations in the home with mysql. is there anything i could do to get this working?
Image
Reply
#6
(2012-04-19, 00:48)akuiraz Wrote: any chance that remote shares could be incorporated? my hard drives are on the same computer as my main xbmc install... i just set them up as shares for future xbmc installations in the home with mysql. is there anything i could do to get this working?

Maybe for samba, others probably not. There's some technical difficult with doing this. If someone were to add more functions to xbmc's virtual file system, then it would be an easy task, but this might take long.

The polling method will work on any mounter file system, so one possibility is to just use this instead. However, this will require you to manually mount the shares so it appears local to xbmc. Xbmc does not do this for you, it just opens/close the url as needed. Not sure if this is of any interest then?
Reply
#7
Hey Takoi, just wanted to check in and see if you've made any progress on adding the music support? Thanks.
Reply
#8
(2012-05-09, 02:01)Aenima99x Wrote: Hey Takoi, just wanted to check in and see if you've made any progress on adding the music support? Thanks.

Yeah, I implemented it just a few days ago.:) You'll have to donwload and install it manually from here for now, but I'll push it to official addon repo very soon!
Reply
#9
Very cool thanks! Not sure why your addon hasn't gotten more attention, it's really great.
Reply
#10
ty. There's been 70 downloads, but no one reporting back so I'm gonna just assume everything works perfectly and release it Smile
Reply
#11
Can I ask how exactly it know when files are added or deleted?

Thanks.
Reply
#12
(2012-05-09, 17:20)Hitcher Wrote: Can I ask how exactly it know when files are added or deleted?

Thanks.
Through system calls. inotify on linux, winapi on windows, otherwise it takes a snapshot of a folders 'modified' timestamp every second or so and compare.
Reply
#13
Cool addon idea, but after installed it, XBMC refuses to close. Stuck on this log message:

18:49:22 T:2232 NOTICE: WATCHDOG: BaseObserver.on_thread_exit()
I wish to have Rotten Tomatoes (user+critics) + IMDB both ratings display in skin.
Reply
#14
(2012-05-09, 23:51)tinybutstrong Wrote: Cool addon idea, but after installed it, XBMC refuses to close. Stuck on this log message:

18:49:22 T:2232 NOTICE: WATCHDOG: BaseObserver.on_thread_exit()

Can you please post a complete debug log? I need some more info to see why this happens..
Reply
#15
Hmm got more info this time, check log bellow:

http://pastebin.com/Cwkqp8QL
I wish to have Rotten Tomatoes (user+critics) + IMDB both ratings display in skin.
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 56

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Library watchdog4