Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
logging.error(
"ACTION------ YouTube not availble on Google Cast Audio")
elif app == 'spotify': # app=spotify|cmd=launch_app|user=XXXXXX|pass=YYYY|value
if cmd == 'NONE':
cmd = 'play_media'
possibleCmd = ['play_media']
if cmd == 'play_media':
fallbackMode = False
keepGoing = True
if 'spdc' in command and 'spkey' in command:
spdc = command['spdc']
spkey = command['spkey']
data = stoken.start_session(spdc, spkey)
access_token = data[0]
expires = data[1] - int(time.time())
else:
logging.error(
"ACTION------ Missing spdc and/or spkey")
keepGoing = False
if value is None:
logging.error(
"ACTION------ Missing content id for spotify")
keepGoing = False
if keepGoing is True:
player = jcast.loadPlayer(
app, {'quitapp': quit_app_before, 'wait': wait})
player.launch_app(access_token, expires)