From a5ffd8871bf6de4415ec532239beb168511dc352 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 3 Oct 2018 19:05:16 -0500 Subject: [PATCH] Fix screensaver toggle --- resources/lib/library.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/lib/library.py b/resources/lib/library.py index 86f59965..459376dd 100644 --- a/resources/lib/library.py +++ b/resources/lib/library.py @@ -183,7 +183,7 @@ class Library(threading.Thread): self.pending_refresh = True if self.pending_refresh: - if not settings('dbSyncScreensaver.bool'): + if not settings('dbSyncScreensaver.bool') and self.screensaver is None: xbmc.executebuiltin('InhibitIdleShutdown(true)') self.screensaver = get_screensaver() @@ -194,10 +194,11 @@ class Library(threading.Thread): self.pending_refresh = False self.save_last_sync() - if not settings('dbSyncScreensaver.bool'): + if not settings('dbSyncScreensaver.bool') and self.screensaver is not None: xbmc.executebuiltin('InhibitIdleShutdown(false)') set_screensaver(value=self.screensaver) + self.screensaver = None if xbmc.getCondVisibility('Container.Content(musicvideos)') or xbmc.getCondVisibility('Window.IsMedia'): # Prevent cursor from moving xbmc.executebuiltin('Container.Refresh')