Simplify code

This commit is contained in:
tomkat83 2017-03-05 16:38:06 +01:00
parent 4d555a9314
commit 768a25d1a3
2 changed files with 1 additions and 12 deletions

View file

@ -113,11 +113,7 @@ def process_command(request_path, params, queue=None):
'action': 'playlist', 'action': 'playlist',
'data': params 'data': params
}) })
return { return
'lastkey': params['key'],
'containerKey': containerKey,
'playQueueID': playQueueID,
}
elif request_path == "player/playback/setParameters": elif request_path == "player/playback/setParameters":
if 'volume' in params: if 'volume' in params:

View file

@ -165,13 +165,6 @@ class MyHandler(BaseHTTPRequestHandler):
answ = process_command(request_path, params, self.server.queue) answ = process_command(request_path, params, self.server.queue)
self.response(getOKMsg(), js.getPlexHeaders()) self.response(getOKMsg(), js.getPlexHeaders())
subMgr.notify() subMgr.notify()
if answ is not None:
subMgr.lastkey = answ['lastkey']
subMgr.containerKey = answ['containerKey']
subMgr.playQueueID = answ['playQueueID']
subMgr.protocol, subMgr.server, subMgr.port = \
window('pms_server').split(':', 2)
subMgr.server = subMgr.server.replace('/', '')
except: except:
log.error('Error encountered. Traceback:') log.error('Error encountered. Traceback:')
import traceback import traceback