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 - anibeasts - 2013-04-28

During shutdown watchdog addon freezes XBMC on Window 7 with the spinning circle. I also had a Visual C ++ runtime exception.

http://forum.xbmc.org/showthread.php?tid=162359&pid=1407828#pid1407828

What course of action can I take to fix the addon?


RE: [RELEASE] Library watchdog - och29 - 2013-04-30

Hi all,
This might be due to my misunderstanding of how Watchdog works but it will not update my library unless there is file added while XBMC in running. I store my files on a server which will automatically add files from SABnzbd etc. XBMC accesses the sources by SAMBA (server = Windows Home Server, HTPC = Windows 7), server is always on. Settings left as default for Watchdog. When I turn on XBMC it will not recognise that there have been new files added, the only time I have got it to work is when a file is added while XBMC is running (log posted below). When this happened it update with all media that had not been added to the library.

Been trying to solve this for ages and am stumped, any help would be greatly appreciated!
och29

Log File on gists.GitHub


RE: [RELEASE] Library watchdog - Nyberg - 2013-05-03

(2013-04-25, 12:49)devkid Wrote: Not a real fix (since its a XBMC bug) but at least a workaround:
(2013-04-01, 22:48)devkid Wrote: I think it is related to the selective video update triggered by the plugin here in main.py:
Code:
def scan(self, library, path):
    """ Tell xbmc to scan. Returns immediately when scanning has started. """
    while self._xbmc_is_busy():
      pass
    log("scanning %s (%s)" % (path, library))
    xbmc.executebuiltin("UpdateLibrary(%s,%s)" % (library, escape_param(path)))

When I change it to
Code:
xbmc.executebuiltin("UpdateLibrary(%s)" % (library))
it works as expected (it takes longer cause it triggers a complete instead of a selective update tho).

IMO this workaround should be included in the addon until XBMC is fixed because so many people have problems with it.


Thanks devkid. My tvshow folder now scans as my movie folder. Much appreciated fix!


RE: [RELEASE] Library watchdog - takoi - 2013-05-05

(2013-04-25, 12:49)devkid Wrote: Not a real fix (since its a XBMC bug) but at least a workaround:
(2013-04-01, 22:48)devkid Wrote: I think it is related to the selective video update triggered by the plugin here in main.py:
Code:
def scan(self, library, path):
    """ Tell xbmc to scan. Returns immediately when scanning has started. """
    while self._xbmc_is_busy():
      pass
    log("scanning %s (%s)" % (path, library))
    xbmc.executebuiltin("UpdateLibrary(%s,%s)" % (library, escape_param(path)))

When I change it to
Code:
xbmc.executebuiltin("UpdateLibrary(%s)" % (library))
it works as expected (it takes longer cause it triggers a complete instead of a selective update tho).

IMO this workaround should be included in the addon until XBMC is fixed because so many people have problems with it.

I hardly think that many people are affected. It's just that specific directory layout and it's been like this since january it's coming up now. Go back 20 pages and see all the talk about global scanning (which is what it used to do), so I'm not making it default. But I added the hack as an option in the latest release.


RE: [RELEASE] Library watchdog - brotbuexe - 2013-05-16

17:05:28 T:6736 ERROR: Exception in thread Thread-10:
Traceback (most recent call last):
File "D:\XBMC\system\python\Lib\threading.py", line 532, in __bootstrap_inner
self.run()
File "D:\XBMC\portable_data\addons\service.watchdog\lib\watchdog\observers\api.py", line 191, in run
self.queue_events(self.timeout)
File "D:\XBMC\portable_data\addons\service.watchdog\core\polling.py", line 80, in queue_events
created, deleted, modified = self._snapshot.diff(new_snapshot)
File "D:\XBMC\portable_data\addons\service.watchdog\core\polling.py", line 66, in diff
if self._stat_info[path] != other._stat_info[path]:
KeyError: 'smb://192.168.1.51/vids_e/movies/test'

I set up a new system with mysql and smb urls. I have some issues so I tried to test the polling on the system by creating a directory "test".
Is this a real error or could I ignore it?


[RELEASE] Library watchdog - Saidou - 2013-05-18

I've got the following program. I installed a fresh install of XBMC with watchdog.
Whatever I do it won't launch automatically or manually.
When I try to open it in the programs menu it just opens the settings menu, where before it just launched.
Anyone knows how I can get it to work?
Here are my logs:

http://xbmclogs.com/show.php?id=20017
http://xbmclogs.com/show.php?id=20018

Here are my watchdog settings:
Code:
<settings>
    <setting id="clean" value="false" />
    <setting id="delay" value="1" />
    <setting id="method" value="0" />
    <setting id="notifications" value="true" />
    <setting id="pauseonplayback" value="true" />
    <setting id="pollingmethod" value="2" />
    <setting id="watchmusic" value="true" />
    <setting id="watchvideo" value="true" />
</settings>


Thanks


RE: [RELEASE] Library watchdog - Kieron - 2013-05-19

I have the lastfm plugin installed, and Watchdog is constantly telling me lastfm:// doesn't exist. Is there no way to exclude certain sources?

I also have a source set up as / (root of my drive), in addition to /media/Movies. Is there no way to exclude the former? I have tried 'exclude from updates' to no avail.


RE: [RELEASE] Library watchdog - Martijn - 2013-05-19

Please look into reducing freezing at shutting down. Too many people are blaming XBMC for this. Cut down the time outs an sleeps that you might use.


RE: [RELEASE] Library watchdog - takoi - 2013-05-20

(2013-05-16, 17:08)brotbuexe Wrote: 17:05:28 T:6736 ERROR: Exception in thread Thread-10:
Traceback (most recent call last):
File "D:\XBMC\system\python\Lib\threading.py", line 532, in __bootstrap_inner
self.run()
File "D:\XBMC\portable_data\addons\service.watchdog\lib\watchdog\observers\api.py", line 191, in run
self.queue_events(self.timeout)
File "D:\XBMC\portable_data\addons\service.watchdog\core\polling.py", line 80, in queue_events
created, deleted, modified = self._snapshot.diff(new_snapshot)
File "D:\XBMC\portable_data\addons\service.watchdog\core\polling.py", line 66, in diff
if self._stat_info[path] != other._stat_info[path]:
KeyError: 'smb://192.168.1.51/vids_e/movies/test'

I set up a new system with mysql and smb urls. I have some issues so I tried to test the polling on the system by creating a directory "test".
Is this a real error or could I ignore it?
Yeah I just discovered several issues with that particular method. will fix.

(2013-05-18, 11:08)Saidou Wrote: Whatever I do it won't launch automatically or manually.
When I try to open it in the programs menu it just opens the settings menu, where before it just launched.
It never did that. It has always launched automatically, and according to your log it does do that.

(2013-05-19, 19:28)Martijn Wrote: Please look into reducing freezing at shutting down. Too many people are blaming XBMC for this. Cut down the time outs an sleeps that you might use.
How long is too long? Afaik, from all the logs posted here (which I think is about 2) the problem of crashing on exit has always been because xbmcvfs calls blocking until it times out so I'm not sure what I can do about that. A big modal telling people not to try to exit perhaps.

(2013-05-19, 17:49)Kieron Wrote: I have the lastfm plugin installed, and Watchdog is constantly telling me lastfm:// doesn't exist. Is there no way to exclude certain sources?

I also have a source set up as / (root of my drive), in addition to /media/Movies. Is there no way to exclude the former? I have tried 'exclude from updates' to no avail.

How did you do that? You added the lastfm url as a music source? Unfortunately it's either getting the media source only automatically or make everyone type them in manually one by one. Why have you added / as a media source when you're not using it as a media source anyway?


RE: [RELEASE] Library watchdog - Saidou - 2013-05-20

(2013-05-20, 19:19)takoi Wrote:
(2013-05-18, 11:08)Saidou Wrote: Whatever I do it won't launch automatically or manually.
When I try to open it in the programs menu it just opens the settings menu, where before it just launched.
It never did that. It has always launched automatically, and according to your log it does do that.

Idd, after not touching it for one day, I see know it is working.
I stressed too soon Big Grin

Thanks!


RE: [RELEASE] Library watchdog - Diggs - 2013-05-21

(2013-05-19, 19:28)Martijn Wrote: Please look into reducing freezing at shutting down. Too many people are blaming XBMC for this. Cut down the time outs an sleeps that you might use.

I am no coder, but will say I really want to use this program and don't due to this reason. Not sure why it won't allow me to shutdown XBMC, but with it installed, XBMC fails to shutdown every time. Remove it, and it works like it should. Not being critical, just letting you know the problem does exist and keeps some of us from using it.


RE: [RELEASE] Library watchdog - takoi - 2013-05-22

(2013-05-21, 00:12)Diggs Wrote:
(2013-05-19, 19:28)Martijn Wrote: Please look into reducing freezing at shutting down. Too many people are blaming XBMC for this. Cut down the time outs an sleeps that you might use.

I am no coder, but will say I really want to use this program and don't due to this reason. Not sure why it won't allow me to shutdown XBMC, but with it installed, XBMC fails to shutdown every time. Remove it, and it works like it should. Not being critical, just letting you know the problem does exist and keeps some of us from using it.

Can you please post a complete debug log then?. The only known issue is when you exit before the script has fully started up. I'm trying to reproduce crashes elsewhere but I just can't make xbmc hang like people say. Clearly you must be doing something I cant think about. I've even tried running it on 10k files so the entire gui lags because it takes so much cpu but it still wont hang no matter what I do.


RE: [RELEASE] Library watchdog - jjmucker - 2013-05-22

Ive just updated to your latest build and everything is working great now. Had to switch on your new optional setting because I have a certain TV folder structure, but works flawless. Both movies and tv.
Thanks for the update.


RE: [RELEASE] Library watchdog - liq456 - 2013-05-26

Does watchdog detect changes to the library when XBMC is not running? For example when you turn on xbmc from being off all night will watchdog detect new files that were added when XBMC was off and then add them to the library when it turns on or does it only detect the changes when xbmc is on?


RE: [RELEASE] Library watchdog - devkid - 2013-05-26

Here is a logfile of how it looks when shutting down XBMC and the watchdog service is not able to shutdown in time. XBMC seems to wait for 5 seconds and then kills it. XBMC hangs within those 5 seconds.

Code:
21:50:18 T:140575892768576   ERROR: XBPyThread::stop - script /storage/.xbmc/addons/service.watchdog/service.py didn't stop in 5 seconds - let's kill it

Complete log:
http://pastebin.com/eFE7ZL5r