Check for asrun() returning None
This commit is contained in:
parent
f26eb24e10
commit
5db02bba3a
|
@ -1032,11 +1032,13 @@ class NowPlayingSegment(object):
|
|||
'''
|
||||
|
||||
spotify = asrun(pl, ascript)
|
||||
if not asrun:
|
||||
return None
|
||||
|
||||
spotify_status = spotify.split(", ")
|
||||
state = self._convert_state(spotify_status[0])
|
||||
if state == 'stop':
|
||||
return
|
||||
return None
|
||||
return {
|
||||
'state': state,
|
||||
'state_symbol': self.STATE_SYMBOLS.get(state),
|
||||
|
|
Loading…
Reference in New Issue