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 - boerkeboel - 2014-10-29

I'm using helix/gotham, both on windows 7.
When the renamer moved files to the scan directory, this plugin updated the library automaticly,
It stopped doing this since a while... I see trakt messages but the content is'nt actualy loaded in the library.


RE: [RELEASE] Library watchdog - Cyntil8ing - 2014-11-15

Hi,

Watchdog is clearing my libraries if I turn XBMC on before my networked content syncs with my Windows 7 player. I realize that one obvious solution would be to turn XBMC on after my Win 7 syncs with the networked content, which I do mostly but there have been occasions that I turn it on before.

My question is, can I delay triggering of the service so that it doesn't clear some content? I noticed that under the advanced setting, there are 3 options that may be the solution. They're "Network Polling Interval", "Delay before updating", and "Startup delay". If it's one of those, which one should I change and are the numbers represented in minutes or seconds?

Thanks for creating this great add-on.


[RELEASE] Library watchdog - zer04c - 2014-11-22

Hi, I'm having problems with watchdog since the update , it now doesn't recognise new files being added in the source locations whether set to auto detect or specific paths put in. I downloaded a beta you posted a while ago which gave me the same result so I switched back but guess those changes have been pushed to the new version.

My log is here

https://www.dropbox.com/s/kwwg5id9dcp4b4u/xbmc.log?dl=0

Many thanks


RE: [RELEASE] Library watchdog - takoi - 2014-11-23

(2014-11-22, 20:36)zer04c Wrote: Hi, I'm having problems with watchdog since the update , it now doesn't recognise new files being added in the source locations whether set to auto detect or specific paths put in. I downloaded a beta you posted a while ago which gave me the same result so I switched back but guess those changes have been pushed to the new version.

My log is here

https://www.dropbox.com/s/kwwg5id9dcp4b4u/xbmc.log?dl=0

Many thanks
That's the point of betas sillySmile To report back so it can be fixed before pushing to everyone. It's been out for a long time now and I have not been made aware of any issues so far.

Looking at your log: if you are talking about "The Dark Valley (2014).strm" not showing up, try increasing "Delay before updating library" in addon settings. (I assume you have it at default (1)? You should not have that at 0 if you do)

Otherwise, most of your sources are not watched (because they are off-line or doest exist). The new "show status dialog on startup" setting is an easy way to get an overview of what is watched/not watched.


[RELEASE] Library watchdog - zer04c - 2014-11-23

(2014-11-23, 14:35)takoi Wrote: Looking at your log: if you are talking about "The Dark Valley (2014).strm" not showing up, try increasing "Delay before updating library" in addon settings. (I assume you have it at default (1)? You should not have that at 0 if you do)

Thanks for the quick reply , changing that setting to 10 has fixed the issue and now everything working again smoothly.

Thanks !


RE: [RELEASE] Library watchdog - istopopoki - 2014-11-25

Hello,
I'm having a problem running this great addon. I see in the 01_XBMC.log the following lines:

Code:
16:36:24 T:2918593616  NOTICE: ## OpenELEC Addon ## 0.3.20
16:36:33 T:2681193552  NOTICE: Thread VideoInfoScanner start, auto delete: false
16:36:33 T:2681193552  NOTICE: VideoInfoScanner: Starting scan ..
16:36:48 T:2681193552  NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:15
16:37:08 T:2697970768   ERROR: Exception in thread Thread-11:
                                            Traceback (most recent call last):
                                              File "/home/stephan/projects/openelec-4.2/build.OpenELEC-RPi.arm-4.2.1/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.xbmc/addons/service.watchdog/lib/watchdog/observers/api.py", line 146, in run
                                                self.queue_events(self.timeout)
                                              File "/storage/.xbmc/addons/service.watchdog/core/polling.py", line 80, in queue_events
                                                files_created, files_deleted = self.take_snapshot()
                                              File "/storage/.xbmc/addons/service.watchdog/core/polling.py", line 60, in take_snapshot
                                                self._snapshot = set(self.list_files(self.watch.path))
                                              File "/storage/.xbmc/addons/service.watchdog/core/polling.py", line 43, in f
                                                for dirs, files in walker(path):
                                              File "/storage/.xbmc/addons/service.watchdog/core/polling_xbmc.py", line 32, in _walk
                                                for dirs, files in _walk(d + '/'):
                                              File "/storage/.xbmc/addons/service.watchdog/core/polling_xbmc.py", line 29, in _walk
                                                files = [path + _.decode('utf-8') for _ in files if not hidden(_)]
                                              File "/home/stephan/projects/openelec-4.2/build.OpenELEC-RPi.arm-4.2.1/Python-2.7.3/.install_pkg/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
                                            UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 6: invalid start byte

So it seems to me that some python script has some difficulties decoding some text. Maybe one of my folder/file has a weird character in it ?
Could you please confirm if my idea makes sense and if there are some ways to identify the faulty folder, as there are many of them.
Also I've seen in the python doc that decode can be called with different options, and that it is possible to ignore errors in decoding. This would prevent watchdog from crashing.
Thanks in advance !


RE: [RELEASE] Library watchdog - henrik1782 - 2014-11-25

can watchdog handle unicode filenames, ex. danish characters æøå. I have some problems with files which includes these characters.

i am running kodi, openelec, raspberry

Any suggestions how to avoid watchdog from stopping.


RE: [RELEASE] Library watchdog - takoi - 2014-11-26

(2014-11-25, 21:25)istopopoki Wrote: Hello,
I'm having a problem running this great addon. I see in the 01_XBMC.log the following lines:

So it seems to me that some python script has some difficulties decoding some text. Maybe one of my folder/file has a weird character in it ?
Could you please confirm if my idea makes sense and if there are some ways to identify the faulty folder, as there are many of them.
Also I've seen in the python doc that decode can be called with different options, and that it is possible to ignore errors in decoding. This would prevent watchdog from crashing.
Thanks in advance !
Complete log please. Post on pastebin or similar.


RE: [RELEASE] Library watchdog - istopopoki - 2014-11-27

(2014-11-26, 14:40)takoi Wrote: Complete log please. Post on pastebin or similar.

Yep, sorry about that.
http://xbmclogs.com/show.php?id=356289
Thanks


RE: [RELEASE] Library watchdog - takoi - 2014-11-30

(2014-11-27, 21:28)istopopoki Wrote:
(2014-11-26, 14:40)takoi Wrote: Complete log please. Post on pastebin or similar.

Yep, sorry about that.
http://xbmclogs.com/show.php?id=356289
Thanks
Unfortunately there was 0 information here. Do you know if you have a file that has invalid encoding and could cause this? I think it's a xbmc bug, it should basically never happen. I have added the workaround though (ignoring. as it's not important that the file name is completely correct). Could you test master just to be sure there aren't anything else?


RE: [RELEASE] Library watchdog - menakite - 2014-12-03

Hm @takoi it seems that "Remove single videos" actually removes single videos... Well, let me explain why that's an issue :-)

Disclaimer: sorry, I don't have a debug log (and I'm not really going to reproduce...).

NFS share is mounted locally in /mnt/xbmc-media; there are 2 sources there: /mnt/xbmc-media/movies (movies), /mnt/xbmc-media/tvshows (TV shows).
I've rebooted my NAS and my library was empty afterwards (both movies and TV shows) - that's because the entire source(s) was removed.

If I understand the watchdog library correctly, the add-on should've received a single "folder deleted" notification for the source directory. It'd need to check if the directory corresponds to any source and then always run CleanLibrary in that case, as it keeps everything under an unavailable source (if run in "silent mode", it won't even ask the user). Re-read and realized that this doesn't make any sense... sorry.


RE: [RELEASE] Library watchdog - istopopoki - 2014-12-06

(2014-11-30, 17:49)takoi Wrote: Unfortunately there was 0 information here. Do you know if you have a file that has invalid encoding and could cause this? I think it's a xbmc bug, it should basically never happen. I have added the workaround though (ignoring. as it's not important that the file name is completely correct). Could you test master just to be sure there aren't anything else?

Hello,
Thanks for the link. I tried it and XBMC scanning is back !
If you feel curious about the file name that triggered the error, do you think you could do something like "decode filename and if error, print filename in log and decode with ignore option". (I can't code in Python as you've guessed reading this Smile ). And I could relaunch the test. But that's only if you want to know as the workaround is perfectly working.
And also, could you tell me what is the expected behavior of watchdog ? If I add an album in my music folder, I see (now Smile ) watchdog being triggered, and it scans the entire music folder (even if only one album was added) which takes approximately 5 minutes. Is that expected or should I deduce something "touches" my folders and make watchdog scan everything even if not needed ?

Thanks a lot for your help and BRAVO for your very useful work !


RE: [RELEASE] Library watchdog - TechLife - 2014-12-24

I am also having the shutdown issue. When I choose to close Kodi, it becomes unresponsive and will crash to this error:

XBMC crashes with Runtime Error! C:\Program Files (x86)\XBMC\XBMC.exe
This application has requested the runtime to terminate it in an unusualy way.
Please contact the applications support theam for more information.

I have had this issue since Gotham. It wasn't until searching the forum the other day that I had any reason to believe it was WatchDog related. Sure enough, after disabling it, no issues. Soon as I re-enable it, right back to crashing out. I can duplicate this on multiple machines (all PC) within the house so it is not isolated to one box.

I tried updating to the beta above and unfortunately, no change.

Debug log here: http://pastebin.com/96NmKDr8

Thank you.


RE: [RELEASE] Library watchdog - yeyeoke - 2014-12-30

Is watchdog compatible with helix?


RE: [RELEASE] Library watchdog - maxadamo - 2015-01-04

(2012-04-19, 15:54)takoi Wrote:
(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.

I don't think so. inotify it's a filesystem event based API. When you write on a network shared (NFS or Samba) the event is received on the filesystem of the server where the sahre is exported, and not on the computer mounting the share.