Correct return value from track_info
parent
37b8c17121
commit
8078bdd4c2
|
@ -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',
|
||||||
|
|
Loading…
Reference in New Issue