Added speak_dialog for play_song spotify skill

This commit is contained in:
Mathieu B 2021-08-01 12:22:00 +02:00
parent 512c423f45
commit 2f2069696a
2 changed files with 9 additions and 4 deletions

View File

@ -15,10 +15,11 @@ class SpotifySkill(Skill, metaclass=SkillRegistering):
data['artist'] if 'artist' in data else None) data['artist'] if 'artist' in data else None)
if song_lists_matching is not None and len(song_lists_matching) >= 1: if song_lists_matching is not None and len(song_lists_matching) >= 1:
print( if 'artist' in data and 'song' not in data:
"[INFO INTENT] - Now playing : " + song_lists_matching[0]['uri'] + " / " + song_lists_matching[0][ self.speak_dialog("playing_from_artist", {'artist': song_lists_matching[0]['artists'][0]['name']})
'name'] + " / " + else:
song_lists_matching[0]['artists'][0]['name']) self.speak_dialog("playing_song_from_artist", {'song': song_lists_matching[0][
'name'], 'artist': song_lists_matching[0]['artists'][0]['name']})
spotify.get_spotify().add_to_queue(uri=song_lists_matching[0]['uri']) spotify.get_spotify().add_to_queue(uri=song_lists_matching[0]['uri'])
spotify.get_spotify().next_track() spotify.get_spotify().next_track()

View File

@ -0,0 +1,4 @@
{{artist}} sur spotify
C'est parti pour {{artist}} sur spotify
Voici un peu de {{artist}} sur spotify
Un des meilleurs titres de {{artist}} c'est maintenant