Fix for multiple OnWake messages

This commit is contained in:
xnappo 2015-05-19 21:03:53 -05:00
parent d6a1a3e919
commit b556707ce6

View file

@ -55,9 +55,11 @@ class Kodi_Monitor(xbmc.Monitor):
if method == "System.OnWake":
xbmc.sleep(10000) #Allow network to wake up
utils.logMsg("Doing_Db_Sync Post Resume: syncDatabase (Started)",1)
if WINDOW.getProperty("SyncDatabaseRunning") != "true":
utils.logMsg("Doing_Db_Sync Post Resume: syncDatabase (Started)",0)
libSync = LibrarySync().FullLibrarySync()
utils.logMsg("Doing_Db_Sync Post Resume: syncDatabase (Finished) " + str(libSync),1)
utils.logMsg("Doing_Db_Sync Post Resume: syncDatabase (Finished) " + str(libSync),0)
if method == "VideoLibrary.OnRemove":
xbmc.log('Intercepted remove from sender: ' + sender + ' method: ' + method + ' data: ' + data)