Kodi Community Forum

Full Version: Multiple calls to UpdateLibrary from a script.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to write a script that updates a select part of my video library from a python script. I have got it working but I needed to use a massive hack. I started with

Code:
xbmc.executebuiltin('XBMC.UpdateLibrary(video,"TV show 1")')
xbmc.executebuiltin('XBMC.UpdateLibrary(video,"TV show 2")')

But, it seems to cause a problem because it didn't wait for the first to complete. So, I had to insert time.sleep(5) between each one. This isn't great but it does at least work. Does anyone have any suggestions? The idea is that doing it this way is nice and quick, only checking those shows that could have updated.

Ideas
only slight improvement is that you can poll the infolabel library.isscanning instead of the sleep. it's not made to maintain a queue.
That would be a good improvement. I will try that. Cheers.