Kodi Community Forum

Full Version: [RELEASE] Library watchdog
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2013-04-11, 18:04)Vathan Wrote: [ -> ]
(2013-04-11, 15:06)takoi Wrote: [ -> ]Well he did not, but it's a know problem. I've already said what the it is. In great detail. It affects everyone using network polling through xbmcvfs. To what degree depends on number of files and method, nothing else.

It looks like my log file was too large for the PM and therefore got truncated.

How else can I send the full log file?

-Vathan

I found your email address on github and sent my logfile as an attachment to that.

-Vathan
(2013-04-11, 13:40)takoi Wrote: [ -> ]http://forum.xbmc.org/showthread.php?tid...pid1387760 it applies to any layout that's deeper that 2 levels

Thanks mate. So basically TV shows wont work then, as most users have their tv structure like that?
No. What do you base that statement on. I don't use such layout, and the partial update have been a feature for > 3 months and the problems with tv shows are just coming up now.
I noticed the tv show issue when I upgraded from 12 to 12.1 if that helps. Maybe it has been fixed in the 12.2pre?
I thought most of us had tv shows 2 levels deep, example, TV SHOWS - Lost - Season 1 - Lost S01 ep01.MKV?
(2013-04-12, 16:33)jjmucker Wrote: [ -> ]I thought most of us had tv shows 2 levels deep, example, TV SHOWS - Lost - Season 1 - Lost S01 ep01.MKV?

That's how I do it. I think it should be a simple fix to the algorithm that Takoi posted a link to. Though I have no clue how to fix that. So I guess we wait....
I don't think anything changed from 12.0 to 12.1, according to the git log https://github.com/xbmc/xbmc/commits/Fro...canner.cpp (could be a change elsewhere though)
(2013-04-12, 18:04)takoi Wrote: [ -> ]I don't think anything changed from 12.0 to 12.1, according to the git log https://github.com/xbmc/xbmc/commits/Fro...canner.cpp (could be a change elsewhere though)

Just saying that is when I noticed it. It could of happened before, but I cannot be sure since lately I have been putting TV shows on the NAS and starting the XBMC with a library auto-update afterwards.
Hello,

I read all of this thread ...
There is any solution to refresh (auto scan) Pictures folder/library ?
Is it too hard to support this feature ?

Thank you
So did anyone test it with 12.2 yet? And is the memory leak indeed fixed?

According to this post the leak should be fixed: http://forum.xbmc.org/showthread.php?tid...pid1399077, assuming that is the same leak they are talking about.

I prefer stable builds so I'll wait till the final 12.2 is available and use different solutions in the meantime, but it sucks though as Watchdog works so nicely.
(2013-04-12, 18:55)MattOZ Wrote: [ -> ]Hello,

I read all of this thread ...
There is any solution to refresh (auto scan) Pictures folder/library ?
Is it too hard to support this feature ?

Thank you
As discussed before there's no such thing as picture library and thus nothing to update or scan. It always reflect filesystem. "Reloading slideshow" or whatever it is that you're really asking for is something different.
(2013-04-24, 12:23)takoi Wrote: [ -> ]
(2013-04-12, 18:55)MattOZ Wrote: [ -> ]Hello,

I read all of this thread ...
There is any solution to refresh (auto scan) Pictures folder/library ?
Is it too hard to support this feature ?

Thank you
As discussed before there's no such thing as picture library and thus nothing to update or scan. It always reflect filesystem. "Reloading slideshow" or whatever it is that you're really asking for is something different.

I was the one who asked about pictures before. Like you say, pictures don't have a library but watchdog (read: polling / systemevents) could be used to reload slideshows and refresh picture listings as new pictures are added.

Looking at the use case this way, I understand people think Watchdog is the tool to do this.
(2013-04-24, 14:04)Robotica Wrote: [ -> ]
(2013-04-24, 12:23)takoi Wrote: [ -> ]
(2013-04-12, 18:55)MattOZ Wrote: [ -> ]Hello,

I read all of this thread ...
There is any solution to refresh (auto scan) Pictures folder/library ?
Is it too hard to support this feature ?

Thank you
As discussed before there's no such thing as picture library and thus nothing to update or scan. It always reflect filesystem. "Reloading slideshow" or whatever it is that you're really asking for is something different.

I was the one who asked about pictures before. Like you say, pictures don't have a library but watchdog (read: polling / systemevents) could be used to reload slideshows and refresh picture listings as new pictures are added.

Looking at the use case this way, I understand people think Watchdog is the tool to do this.

Oh, well. Sorry but I don't see this is a use case for watchdog like you though. Watchdog is for updating library, you ask me to "reload slideshows and refresh picture listings". (Btw. are you sure that's even possible to do in the xbmc api?). The problem is: what will be the next people will want to do on certain file system events? Won't this soon turn into a generic 'trigger action x on event y' script? Currently this addon is specifically designed to do library updates, which is not trivial, so most of the code specifically deals with that. Getting the file system events is the easy part and can surely be easily adopted to another addon by a another developer.
(2013-04-12, 16:46)thestealth Wrote: [ -> ]
(2013-04-12, 16:33)jjmucker Wrote: [ -> ]I thought most of us had tv shows 2 levels deep, example, TV SHOWS - Lost - Season 1 - Lost S01 ep01.MKV?

That's how I do it. I think it should be a simple fix to the algorithm that Takoi posted a link to. Though I have no clue how to fix that. So I guess we wait....

so is there a fix for this?
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.