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