Correct return value from track_info

pull/433/head
Åke Forslund 2016-12-11 17:45:25 +01:00
parent 37b8c17121
commit 8078bdd4c2
1 changed files with 2 additions and 8 deletions

View File

@ -181,17 +181,11 @@ class PlaybackControlSkill(MediaSkill):
self.current.restore_volume() self.current.restore_volume()
def handle_currently_playing(self, message): def handle_currently_playing(self, message):
if self.current: return
track_info = self.current.track_info()
if track_info is not None:
data = {'current_track': track_info['name'],
'artist': track_info['album']}
self.speak_dialog('currently_playing', data)
time.sleep(6)
def _track_info(self, message): def _track_info(self, message):
if self.current: if self.current:
track_info = self.current.track_info track_info = self.current.track_info()
else: else:
track_info = {} track_info = {}
self.emitter.emit(Message('MycroftAudioServiceTrackInfoReply', self.emitter.emit(Message('MycroftAudioServiceTrackInfoReply',