Kodi Community Forum
[RELEASE] Library watchdog - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: [RELEASE] Library watchdog (/showthread.php?tid=128896)



RE: [RELEASE] Library watchdog - takoi - 2013-02-11

(2013-02-11, 20:59)brotbuexe Wrote:
(2013-02-10, 17:22)takoi Wrote: Auto only works for local drives and network locations set in xbmc. If you have network shares mounted by OS then you need to set method to Polling. There's no way to know where the drive for "N:\vids\tv" is physical located. (i''ll update the faq)

Hm, but it does work fine for me with set to auto.
+ 978 14:46:06 T:5092 DEBUG: service.watchdog: watching <P:\vids\tv\> using <class 'watchdog.observers.read_directory_changes.WindowsApiObserver'>
2013-02-11 20:05:24:0553 + 201820 20:05:24 T:6116 DEBUG: service.watchdog: <deleted> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.mkv>
2013-02-11 20:05:24:0553 + 201829 20:05:24 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:24:0553 + 201830 20:05:24 T:6116 DEBUG: service.watchdog: <deleted> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.nfo>
2013-02-11 20:05:24:0553 + 201831 20:05:24 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:24:0553 + 201832 20:05:24 T:6116 DEBUG: service.watchdog: <deleted> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.tbn>
2013-02-11 20:05:24:0553 + 201833 20:05:24 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:33:0116 + 201922 20:05:32 T:6116 DEBUG: service.watchdog: <created> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.mkv>
2013-02-11 20:05:33:0116 + 201923 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:33:0116 + 201924 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.mkv>
2013-02-11 20:05:33:0116 + 201925 20:05:32 T:6116 DEBUG: service.watchdog: <created> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.nfo>
2013-02-11 20:05:33:0116 + 201926 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:33:0116 + 201927 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.nfo>
2013-02-11 20:05:33:0116 + 201928 20:05:32 T:6116 DEBUG: service.watchdog: <created> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.tbn>
2013-02-11 20:05:33:0116 + 201929 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05>
2013-02-11 20:05:33:0116 + 201930 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.tbn>

p: is a mount to \\server\f$, Os on both sides are win7.
Cool. That's new to me. Im using linux/inotify and it certainly doesn't work here. I guess it's a windows feature..

(2013-02-11, 20:59)brotbuexe Wrote: But something is still wrong:

+ 201954 20:05:32 T:6116 DEBUG: service.watchdog: <modified> <P:\vids\tv\Sons of Anarchy\Season 05\Sons of Anarchy - 5x01 - Sovereign - 720p WEB-DL.tbn>
+ 202248 20:05:58 T:6532 DEBUG: service.watchdog: scanning N:\vids\tv\ (video)
+ 202273 20:05:59 T:6532 DEBUG: service.watchdog: cleaning video library
+ 202412 20:06:09 T:7344 DEBUG: service.watchdog: <modified> <N:\sab\tv>
+ 202737 20:06:38 T:6532 DEBUG: service.watchdog: scanning P:\vids\tv\ (video)
(delay set to 20)

Looks like it does select the wrong path for scanning?

and n:\sab is excluded from scans.
Looks fine to me, but cant really know for sure from that small snippet. And don't mind excluded paths showing up. Nothing will happen.

(2013-02-11, 20:59)brotbuexe Wrote: + 981 14:46:07 T:5092 DEBUG: service.watchdog: watching <N:\sab\> using <class 'watchdog.observers.read_directory_changes.WindowsApiObserver'>
+ 75024 17:00:35 T:8172 DEBUG: Testing Existence (N:\sab\)

If its excluded (its also set to content none), shouldnt it excluded from watching too?

(version 0.7.1)

No. There's no way to tell if a path is set to excluded or not. But like I sad: nothing will happen. It wont be scanned.


RE: [RELEASE] Library watchdog - Phaeton - 2013-02-12

Takoi, I hope you can help please, great add-on but I am having trouble, probably my fault as all this is quite new, I have put a log at http://xbmclogs.com/show.php?id=35138 hopefully correct.

I'm using a Raspberry Pi with a Linksys DNS-320 NAS drive, when I put files into folders they are not appearing via XBMC even if I reboot, if I create a new directory on the NAS & put something in that does appear. Another issue is that if I browse the files on the XBMC it shows me a folder called SCANDAL which does not exit, but it doesn't show me one called Scandal (US) which does.

I have Watchdog set for Polling.

Any pointers would be most grateful.

Alan,,,


RE: [RELEASE] Library watchdog - carbncl - 2013-02-13

Thanks for this plugin, looks great.

Just having some troubles with delay setting on v0.7.1
I tried setting it to different values, like 30 and 300, also switching method to auto/polling... (restarting xbmc each time)
But from what i see in XBMC logs that watchdog is still continuously accessing my network samba shares. (OpenDir spam...)
Which bothers me, maybe i should just ignore this, but i'm kinda scared of it massively accessing network / drives...

Maybe I'm doing something wrong?
Disabled for now, maybe will try to give a look at source code later...


RE: [RELEASE] Library watchdog - jesse003 - 2013-02-14

(2013-02-06, 18:19)takoi Wrote: New big feature is ofc out-of-the-box support for network shares.

Migrating from old setup with shares mounted at OS level:
- everything should work out of the box. You can choose to go back to letting xbmc handle the shares but if you don't mind it's preferable to keep them mounted at OS level because of better performance. Note: do not change method to 'Auto' if you choose to keep them mounted at OS level. It must be set to 'Polling'. Auto only work if xbmc handles them.
- MySQL users: to avoid scan/clean being done twice for every event, the os mounted media source must be removed.


I am using mySQL and windows7. Addon will now work on frodo with SMB shares? I will test it after I get a reply as I have just gone through a full reset of everything and messing with this addon got me in a mess in the first place.

And I should set it to auto?


RE: [RELEASE] Library watchdog - bobbintb - 2013-02-14

Nice add-on but I do have a question. If I use an NFS share mounted on the OS level in conjunction with the add-on but the NFS share is not always available, will that cause issues like the library being deleted? My server that contains my media is not always on when XBMC is on. So since this add-on cleans up items, if I turn on XBMC and the network share is not available, will it clean up the library and then start from scratch once the share is available or will it just sit and wait for the network share to become available?


RE: [RELEASE] Library watchdog - Livin - 2013-02-15

takoi,
love the addon - can you make it so there is no modal popup, it just updates in the background?


RE: [RELEASE] Library watchdog - bobbintb - 2013-02-15

(2013-02-15, 02:51)Livin Wrote: takoi,
love the addon - can you make it so there is no modal popup, it just updates in the background?

unless i'm mistaken, i believe that option is in the settings.


RE: [RELEASE] Library watchdog - takoi - 2013-02-16

(2013-02-11, 19:37)xombiemp Wrote:
(2013-02-10, 17:09)takoi Wrote:
(2013-02-10, 03:26)xombiemp Wrote: Thanks for this great plugin. I'm having some troubles with it auto refreshing my library though.

They're all detected by the addon and the scan is triggered. The problem is that xbmc scans but don't see that anything has changed. Probably something in between xbmc and your server that don't properly invalidate cache. Try setting a longer delay in the addon setting. That's the delay the addon will wait after the new file was detected to telling xbmc to scan.


I have stripped out as many variables as possible. I did a fresh default install of XBMC (no mysql, path redirection, symlinking or anything) and added a smb source. The full path of the tv show I am testing is:
data
----Media
--------TV Shows
------------Modern Family
----------------Season 02
--------------------mkv, nfo, tbn files

The source I added in xbmc was smb://192.168.120.178/Media/TV Shows/
I installed the watchdog addon and left the default settings, enabled debug logging, and added a keymap of g to XBMC.UpdateLibrary(video).

So for the first test I just moved episode 19 mkv, nfo, and tbn to the Season 02 directory. I saw a very quick flash of the updating notification in the top right but the episode was not added to the library. I then pressed g to initiate a video library update and the updating notification appeared and the episode was added to the library. See the full log of this test log

For the second test, I modified the delay in watchdog, as suggested, to 10. I did the same test as above with episode 20 and had the exact same results. See the log for that here: log

You can compare the 2 different library updates in each of these two files and see that they look a bit different. Any idea what is going on?

That is very strange indeed. Never seen anything like it. Can you try to map your key to exactly the string "UpdateLibrary(video,smb://192.168.120.178/Media/TV Shows/)"? That's what the script is sending. And try to add an even longer delay, like a couple of min. Just for the sake of confirming it's not caching trouble.


RE: [RELEASE] Library watchdog - takoi - 2013-02-16

(2013-02-12, 22:44)Phaeton Wrote: Takoi, I hope you can help please, great add-on but I am having trouble, probably my fault as all this is quite new, I have put a log at http://xbmclogs.com/show.php?id=35138 hopefully correct.

I'm using a Raspberry Pi with a Linksys DNS-320 NAS drive, when I put files into folders they are not appearing via XBMC even if I reboot, if I create a new directory on the NAS & put something in that does appear. Another issue is that if I browse the files on the XBMC it shows me a folder called SCANDAL which does not exit, but it doesn't show me one called Scandal (US) which does.

I have Watchdog set for Polling.

Any pointers would be most grateful.

Alan,,,

First: update to frodo stable. You're using rc1. The fact that you have other issues tells me it's a problem with xbmc or your nas. Come back with an updated log if it still persists.


RE: [RELEASE] Library watchdog - takoi - 2013-02-16

(2013-02-14, 17:14)bobbintb Wrote: Nice add-on but I do have a question. If I use an NFS share mounted on the OS level in conjunction with the add-on but the NFS share is not always available, will that cause issues like the library being deleted? My server that contains my media is not always on when XBMC is on. So since this add-on cleans up items, if I turn on XBMC and the network share is not available, will it clean up the library and then start from scratch once the share is available or will it just sit and wait for the network share to become available?

You can turn off the cleaning. It's off by default.


RE: [RELEASE] Library watchdog - fernandovg - 2013-02-17

does it works with USB HDD?

I'm using a USB HDD 1TB + USB hub + Raspberry Pi.

Didn't seem to work.
Thanks!


RE: [RELEASE] Library watchdog - Livin - 2013-02-17

(2013-02-15, 16:46)bobbintb Wrote:
(2013-02-15, 02:51)Livin Wrote: takoi,
love the addon - can you make it so there is no modal popup, it just updates in the background?

unless i'm mistaken, i believe that option is in the settings.

I have the addon config set to 'not' show the UI but it still does. I just checked the SETTINGS.XML under the 'resources' folder and it look like the settings are wrong - looks like they are not saving. I don't have the problem with other addons.

Code:
<settings>
  <category label="30001">
    <setting label="30003" id="watchvideo" type="bool" default="true"/>
    <setting label="30004" id="watchmusic" type="bool" default="true"/>
    <setting label="30005" id="clean" type="bool" default="false"/>
    <setting label="30011" id="notifications" type="bool" default="true"/>
  </category>
  <category label="30002">
    <setting label="30006" id="method" type="select" lvalues="30007|30008" default="0"/>
    <setting label="30012" id="pollingmethod" type="select" lvalues="30013|30014|30015" default="2"/>
    <setting label="30010" id="delay" type="number" default="1"/>
  </category>
</settings>



RE: [RELEASE] Library watchdog - takoi - 2013-02-17

(2013-02-17, 18:21)Livin Wrote: it look like the settings are wrong - looks like they are not saving.
No, it's correct. The setting is for notifications. The popup on clean/scan can't be turned off. It's been discussed hundreds of times.


RE: [RELEASE] Library watchdog - Livin - 2013-02-17

(2013-02-17, 19:13)takoi Wrote:
(2013-02-17, 18:21)Livin Wrote: it look like the settings are wrong - looks like they are not saving.
No, it's correct. The setting is for notifications. The popup on clean/scan can't be turned off. It's been discussed hundreds of times.

Why can't it be suppressed? It is very intrusive and literally stops anything you are doing. I' think at minimum you could set it to update/clean in the background during video playback or something like Rob's updater does (http://forum.xbmc.org/showthread.php?tid=119520)?


RE: [RELEASE] Library watchdog - takoi - 2013-02-17

(2013-02-17, 20:02)Livin Wrote:
(2013-02-17, 19:13)takoi Wrote:
(2013-02-17, 18:21)Livin Wrote: it look like the settings are wrong - looks like they are not saving.
No, it's correct. The setting is for notifications. The popup on clean/scan can't be turned off. It's been discussed hundreds of times.

Why can't it be suppressed? It is very intrusive and literally stops anything you are doing. I' think at minimum you could set it to update/clean in the background during video playback or something like Rob's updater does (http://forum.xbmc.org/showthread.php?tid=119520)?

I dont think that's possible, and I don't think that addon can do it either. And it already won't scan during playback.