mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Fix screensaver detect
This commit is contained in:
parent
418ee92ec8
commit
b433f6a870
1 changed files with 20 additions and 10 deletions
|
@ -232,9 +232,12 @@ class LibrarySync(threading.Thread):
|
||||||
# Only run once when first setting up. Can be run manually.
|
# Only run once when first setting up. Can be run manually.
|
||||||
music_enabled = settings('enableMusic') == "true"
|
music_enabled = settings('enableMusic') == "true"
|
||||||
|
|
||||||
|
if settings('dbSyncScreensaver') == "true":
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
||||||
screensaver = utils.getScreensaver()
|
screensaver = utils.getScreensaver()
|
||||||
utils.setScreensaver(value="")
|
utils.setScreensaver(value="")
|
||||||
|
|
||||||
window('emby_dbScan', value="true")
|
window('emby_dbScan', value="true")
|
||||||
# Add sources
|
# Add sources
|
||||||
utils.sourcesXML()
|
utils.sourcesXML()
|
||||||
|
@ -352,8 +355,11 @@ class LibrarySync(threading.Thread):
|
||||||
xbmc.executebuiltin('UpdateLibrary(video)')
|
xbmc.executebuiltin('UpdateLibrary(video)')
|
||||||
elapsedtotal = datetime.now() - starttotal
|
elapsedtotal = datetime.now() - starttotal
|
||||||
|
|
||||||
|
if settings('dbSyncScreensaver') == "true":
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
||||||
utils.setScreensaver(value=screensaver)
|
utils.setScreensaver(value=screensaver)
|
||||||
|
|
||||||
window('emby_dbScan', clear=True)
|
window('emby_dbScan', clear=True)
|
||||||
window('emby_initialScan', clear=True)
|
window('emby_initialScan', clear=True)
|
||||||
|
|
||||||
|
@ -561,6 +567,8 @@ class LibrarySync(threading.Thread):
|
||||||
with database.DatabaseConn('emby') as cursor_emby:
|
with database.DatabaseConn('emby') as cursor_emby:
|
||||||
with database.DatabaseConn('video') as cursor_video:
|
with database.DatabaseConn('video') as cursor_video:
|
||||||
|
|
||||||
|
if settings('dbSyncScreensaver') == "true":
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
xbmc.executebuiltin('InhibitIdleShutdown(true)')
|
||||||
screensaver = utils.getScreensaver()
|
screensaver = utils.getScreensaver()
|
||||||
utils.setScreensaver(value="")
|
utils.setScreensaver(value="")
|
||||||
|
@ -618,6 +626,8 @@ class LibrarySync(threading.Thread):
|
||||||
if kodiupdate_video:
|
if kodiupdate_video:
|
||||||
self.forceLibraryUpdate = True
|
self.forceLibraryUpdate = True
|
||||||
|
|
||||||
|
if settings('dbSyncScreensaver') == "true":
|
||||||
|
|
||||||
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
xbmc.executebuiltin('InhibitIdleShutdown(false)')
|
||||||
utils.setScreensaver(value=screensaver)
|
utils.setScreensaver(value=screensaver)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue