Disable screensaver during the fast sync

Allow sync to run if livetv is playing.
This commit is contained in:
angelblue05 2018-01-25 05:16:01 -06:00
parent d493caf077
commit 6c1bd5cf47

View file

@ -538,6 +538,10 @@ class LibrarySync(threading.Thread):
with database.DatabaseConn('emby') as cursor_emby:
with database.DatabaseConn('video') as cursor_video:
xbmc.executebuiltin('InhibitIdleShutdown(true)')
screensaver = utils.getScreensaver()
utils.setScreensaver(value="")
emby_db = embydb.Embydb_Functions(cursor_emby)
incSyncIndicator = int(settings('incSyncIndicator') or 10)
@ -591,6 +595,9 @@ class LibrarySync(threading.Thread):
if kodiupdate_video:
self.forceLibraryUpdate = True
xbmc.executebuiltin('InhibitIdleShutdown(false)')
utils.setScreensaver(value=screensaver)
# if stuff happened then do some stuff
if update_embydb:
update_embydb = False
@ -744,7 +751,9 @@ class LibrarySync(threading.Thread):
self.incremental_count = 0
window('emby_kodiScan', clear=True)
if not xbmc.Player().isPlaying() and window('emby_dbScan') != "true" and window('emby_shouldStop') != "true":
if ((not xbmc.Player().isPlaying() or xbmc.getCondVisibility('VideoPlayer.Content(livetv)')) and
window('emby_dbScan') != "true" and window('emby_shouldStop') != "true"):
self.incrementalSync()
if window('emby_onWake') == "true" and window('emby_online') == "true":