mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-16 21:26:14 +00:00
Prevent screensaver during sync
Initial, repair, manual syncs.
This commit is contained in:
parent
405cecfec7
commit
2a107b45fe
2 changed files with 41 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
import cProfile
|
||||
import inspect
|
||||
import json
|
||||
import pstats
|
||||
import sqlite3
|
||||
import os
|
||||
|
@ -119,6 +120,40 @@ def getKodiMusicDBPath():
|
|||
% dbVersion.get(kodibuild, "")).decode('utf-8')
|
||||
return dbPath
|
||||
|
||||
def getScreensaver():
|
||||
# Get the current screensaver value
|
||||
query = {
|
||||
|
||||
'jsonrpc': "2.0",
|
||||
'id': 0,
|
||||
'method': "Settings.getSettingValue",
|
||||
'params': {
|
||||
|
||||
'setting': "screensaver.mode"
|
||||
}
|
||||
}
|
||||
result = xbmc.executeJSONRPC(json.dumps(query))
|
||||
result = json.loads(result)
|
||||
screensaver = result['result']['value']
|
||||
|
||||
return screensaver
|
||||
|
||||
def setScreensaver(value):
|
||||
# Toggle the screensaver
|
||||
query = {
|
||||
|
||||
'jsonrpc': "2.0",
|
||||
'id': 0,
|
||||
'method': "Settings.setSettingValue",
|
||||
'params': {
|
||||
|
||||
'setting': "screensaver.mode",
|
||||
'value': value
|
||||
}
|
||||
}
|
||||
result = xbmc.executeJSONRPC(json.dumps(query))
|
||||
logMsg("EMBY", "Toggling screensaver: %s %s" % (value, result), 1)
|
||||
|
||||
def reset():
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue