[RELEASE] Library watchdog

  Thread Rating:
  • 4 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
boerkeboel Offline
Junior Member
Posts: 29
Joined: Jan 2013
Reputation: 2
Post: #616
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.
find quote
Cyntil8ing Offline
Junior Member
Posts: 1
Joined: Oct 2014
Reputation: 0
Post: #617
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.
find quote
zer04c Offline
Junior Member
Posts: 32
Joined: Jan 2013
Reputation: 0
Post: #618
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
find quote
takoi Offline
Team-Kodi Member
Posts: 842
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #619
(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.
(This post was last modified: 2014-11-23 14:35 by takoi.)
find quote
zer04c Offline
Junior Member
Posts: 32
Joined: Jan 2013
Reputation: 0
Post: #620
(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 !
find quote
istopopoki Offline
Junior Member
Posts: 3
Joined: Nov 2014
Reputation: 0
Post: #621
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 !
find quote
henrik1782 Offline
Junior Member
Posts: 1
Joined: Nov 2014
Reputation: 0
Post: #622
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.
find quote
takoi Offline
Team-Kodi Member
Posts: 842
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #623
(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.
find quote
istopopoki Offline
Junior Member
Posts: 3
Joined: Nov 2014
Reputation: 0
Post: #624
(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
find quote
takoi Offline
Team-Kodi Member
Posts: 842
Joined: Oct 2009
Reputation: 12
Location: Norway
Post: #625
(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?
(This post was last modified: 2014-11-30 17:50 by takoi.)
find quote
menakite Offline
Member
Posts: 85
Joined: Sep 2014
Reputation: 0
Post: #626
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.
(This post was last modified: 2014-12-03 20:37 by menakite.)
find quote
istopopoki Offline
Junior Member
Posts: 3
Joined: Nov 2014
Reputation: 0
Post: #627
(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 !
find quote
TechLife Offline
Donor
Posts: 593
Joined: Aug 2008
Reputation: 20
Location: Aurora, CO
Post: #628
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.

*If I helped, please +rep below*
Windows Media Center PVR add-on (pvr.wmc) and Server (ServerWMC)
The XBMC team, plug-in devs, skinners, etc. do this for us for FREE in their spare time because they want to. Think about that for a second before you start bitching...
(This post was last modified: 2014-12-24 07:00 by TechLife.)
find quote
Post Reply