From a07f545d5a780d4816631ad71c4da49a9ab666d6 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 29 Apr 2016 15:48:09 +1000 Subject: [PATCH] added option to perform sync when screensaver is deactivated --- resources/language/English/strings.xml | 1 + resources/lib/kodimonitor.py | 7 +++++++ resources/settings.xml | 1 + 3 files changed, 9 insertions(+) diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 78a94417..3a8d7ba4 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -298,6 +298,7 @@ Duration of the music library pop up (in seconds) Server messages Generate a new device Id + Sync when screensaver is deactivated Welcome diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index f2b5ae86..74e32717 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -205,5 +205,12 @@ class KodiMonitor(xbmc.Monitor): xbmc.sleep(10000) utils.window('emby_onWake', value="true") + + elif method == "GUI.OnScreensaverDeactivated": + if utils.settings('dbSyncScreensaver') == "true": + xbmc.sleep(1000); + utils.window('emby_onWake', value="true") + + elif method == "Playlist.OnClear": pass \ No newline at end of file diff --git a/resources/settings.xml b/resources/settings.xml index d5d815dc..24458165 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -32,6 +32,7 @@ +