mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Fix screensaver toggle
This commit is contained in:
parent
f1068667b4
commit
a5ffd8871b
1 changed files with 3 additions and 2 deletions
|
@ -183,7 +183,7 @@ class Library(threading.Thread):
|
||||||
self.pending_refresh = True
|
self.pending_refresh = True
|
||||||
|
|
||||||
if self.pending_refresh:
|
if self.pending_refresh:
|
||||||
if not settings('dbSyncScreensaver.bool'):
|
if not settings('dbSyncScreensaver.bool') and self.screensaver is None:
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
||||||
self.screensaver = get_screensaver()
|
self.screensaver = get_screensaver()
|
||||||
|
@ -194,10 +194,11 @@ class Library(threading.Thread):
|
||||||
self.pending_refresh = False
|
self.pending_refresh = False
|
||||||
self.save_last_sync()
|
self.save_last_sync()
|
||||||
|
|
||||||
if not settings('dbSyncScreensaver.bool'):
|
if not settings('dbSyncScreensaver.bool') and self.screensaver is not None:
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
||||||
set_screensaver(value=self.screensaver)
|
set_screensaver(value=self.screensaver)
|
||||||
|
self.screensaver = None
|
||||||
|
|
||||||
if xbmc.getCondVisibility('Container.Content(musicvideos)') or xbmc.getCondVisibility('Window.IsMedia'): # Prevent cursor from moving
|
if xbmc.getCondVisibility('Container.Content(musicvideos)') or xbmc.getCondVisibility('Window.IsMedia'): # Prevent cursor from moving
|
||||||
xbmc.executebuiltin('Container.Refresh')
|
xbmc.executebuiltin('Container.Refresh')
|
||||||
|
|
Loading…
Reference in a new issue