howto detect if updatelibrary is done? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: howto detect if updatelibrary is done? (/showthread.php?tid=107871) |
howto detect if updatelibrary is done? - PierreC - 2011-08-16 Is there anyway to detect if a updatelibrary is done ? I have just done a simple autoexec.py script where it start scanning a specific path for new series, and now I also want it to scan for movies. The problem I am having is that using 2 updatelibraries in a row breaks the scan completely, so I need a way to detect if the first scan is done before executing the next one. Is there a way to do this ? if so, how? And fyi, dont tell me to do a complete library scan at startup, it takes to long time for me (30+ min). - mkortstiege - 2011-08-16 Something like this might work (untested pseudo code) .. Code: while (xbmc.getCondVisibility('Library.IsScanningVideo')): - PierreC - 2011-08-16 Thanks, but it didnt seem to work , my code is as follows: Code: import os, xbmc, time What happens is that the library is scanning and after 10 seconds the notification is still popping up, while library is still scanning. - mkortstiege - 2011-08-16 What revision/build of XBMC you're running. The infolabel Library.IsScanningVideo is a pretty new one. - PierreC - 2011-08-16 I found the solution! Code: while (xbmc.getCondVisibility('Window.IsActive(videoscan)')) : xbmc.sleep(10) Thanks vdrfan for the hint on getCondVisibility - PierreC - 2011-08-16 vdrfan Wrote:What revision/build of XBMC you're running. The infolabel Library.IsScanningVideo is a pretty new one. I am on 10.1 - mkortstiege - 2011-08-16 Glad to hear it's working now |