Hi all, after having some trouble with getting Jasper run on Jessie I finally got everything to work with the version from the dev-branch. Unfortunately I recognized that if I enter the Music mode I am not able to play any music. The MPD Client stays in the 'stopped mode' all the time. After some time of analyzing the code I could solve the problem:
In the "mpdclient.py" module the following method causes the bug:
def get_playback_state(self):
with self.connection() as conn:
status = conn.status()
state = status['state']
return state
if state == 'play':
return PLAYBACK_STATE_PLAYING
elif state == 'pause':
return PLAYBACK_STATE_PAUSED
elif state == 'stop':
return PLAYBACK_STATE_STOPPED
else:
raise RuntimeError('Unknown playback state!')
The state is "return" is set to early and returns the state as string from the conn object. To fix this the return statement simply has to be moved to the end of the method.
I hope I could help someone to fix this problem and excuse me for my bad english :stuck_out_tongue_closed_eyes:
Hi all, after having some trouble with getting Jasper run on Jessie I finally got everything to work with the version from the dev-branch. Unfortunately I recognized that if I enter the Music mode I am not able to play any music. The MPD Client stays in the 'stopped mode' all the time. After some time of analyzing the code I could solve the problem: In the "mpdclient.py" module the following method causes the bug: def get_playback_state(self): with self.connection() as conn: status = conn.status() state = status['state'] return state if state == 'play': return PLAYBACK_STATE_PLAYING elif state == 'pause': return PLAYBACK_STATE_PAUSED elif state == 'stop': return PLAYBACK_STATE_STOPPED else: raise RuntimeError('Unknown playback state!')
The state is "return" is set to early and returns the state as string from the conn object. To fix this the return statement simply has to be moved to the end of the method. I hope I could help someone to fix this problem and excuse me for my bad english :stuck_out_tongue_closed_eyes: