parent
9cb99a8077
commit
3cd76fa291
2 changed files with 6 additions and 23 deletions
|
@ -605,6 +605,7 @@ class LibrarySync(Thread):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Empty movies, tv shows?
|
# Empty movies, tv shows?
|
||||||
log.error('Path hack failed with error message: %s' % str(e))
|
log.error('Path hack failed with error message: %s' % str(e))
|
||||||
|
setScreensaver(value=screensaver)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def processView(self, folderItem, kodi_db, plex_db, totalnodes):
|
def processView(self, folderItem, kodi_db, plex_db, totalnodes):
|
||||||
|
|
|
@ -278,33 +278,15 @@ def create_actor_db_index():
|
||||||
|
|
||||||
def getScreensaver():
|
def getScreensaver():
|
||||||
# Get the current screensaver value
|
# Get the current screensaver value
|
||||||
query = {
|
params = {'setting': "screensaver.mode"}
|
||||||
|
return JSONRPC('Settings.getSettingValue').execute(params)['result']['value']
|
||||||
|
|
||||||
'jsonrpc': "2.0",
|
|
||||||
'id': 0,
|
|
||||||
'method': "Settings.getSettingValue",
|
|
||||||
'params': {
|
|
||||||
|
|
||||||
'setting': "screensaver.mode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return loads(xbmc.executeJSONRPC(dumps(query)))['result']['value']
|
|
||||||
|
|
||||||
def setScreensaver(value):
|
def setScreensaver(value):
|
||||||
# Toggle the screensaver
|
# Toggle the screensaver
|
||||||
query = {
|
params = {'setting': "screensaver.mode", 'value': value}
|
||||||
|
log.debug('Toggling screensaver to "%s": %s'
|
||||||
'jsonrpc': "2.0",
|
% (value, JSONRPC('Settings.setSettingValue').execute(params)))
|
||||||
'id': 0,
|
|
||||||
'method': "Settings.setSettingValue",
|
|
||||||
'params': {
|
|
||||||
|
|
||||||
'setting': "screensaver.mode",
|
|
||||||
'value': value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
log.debug("Toggling screensaver: %s %s"
|
|
||||||
% (value, xbmc.executeJSONRPC(dumps(query))))
|
|
||||||
|
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
|
|
Loading…
Reference in a new issue