pause the music before speaking dialog for spotify skill

This commit is contained in:
Mathieu B 2021-08-01 18:24:13 +02:00
parent a6e749ce5a
commit 8492038b38

View File

@ -15,6 +15,9 @@ class SpotifySkill(Skill, metaclass=SkillRegistering):
data['artist'] if 'artist' in data else None)
if song_lists_matching is not None and len(song_lists_matching) >= 1:
# pause the music then speak dialog
spotify.get_spotify().pause_playback()
if 'artist' in data and 'song' not in data:
self.speak_dialog("play_from_artist", {'artist': song_lists_matching[0]['artists'][0]['name']})
else: