Propagate a MusicStopEvent upon playback stop even when the context of the current track is not available

This commit is contained in:
Fabio Manganiello 2019-02-13 17:38:58 +01:00
parent 32cdab5530
commit a287a10bcc

View file

@ -138,8 +138,6 @@ class MusicMopidyBackend(Backend):
and msg.get('new_state') == 'stopped'): and msg.get('new_state') == 'stopped'):
status['state'] = 'stop' status['state'] = 'stop'
track = self._parse_track(track) track = self._parse_track(track)
if not track:
return
self.bus.post(MusicStopEvent(status=status, track=track)) self.bus.post(MusicStopEvent(status=status, track=track))
elif event == 'track_playback_started': elif event == 'track_playback_started':
track = self._parse_track(track) track = self._parse_track(track)