From d617aa13ac9a682d568d47b698acf71eb31745cb Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 24 Jun 2015 09:03:49 +0200 Subject: [PATCH] added window prop to force refresh widgets if content has changed --- resources/lib/LibrarySync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index dd6c26c8..df614161 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -115,6 +115,9 @@ class LibrarySync(): # set prop to show we have run for the first time WINDOW.setProperty("startup", "done") + # tell any widgets to refresh because the content has changed + WINDOW.setProperty("widgetreload", datetime.now().strftime('%Y-%m-%d %H:%M:%S')) + finally: WINDOW.setProperty("SyncDatabaseRunning", "false") utils.logMsg("Sync DB", "syncDatabase Exiting", 0) @@ -625,9 +628,10 @@ class LibrarySync(): cursor.close() finally: - xbmc.executebuiltin("UpdateLibrary(video)") WINDOW.setProperty("SyncDatabaseRunning", "false") + # tell any widgets to refresh because the content has changed + WINDOW.setProperty("widgetreload", datetime.now().strftime('%Y-%m-%d %H:%M:%S')) def ShouldStop(self):