From 8492038b385748fbab714b84a0f4c0c68e9a4f97 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Sun, 1 Aug 2021 18:24:13 +0200 Subject: [PATCH] pause the music before speaking dialog for spotify skill --- jarvis/skills/entertainement/spotify/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jarvis/skills/entertainement/spotify/__init__.py b/jarvis/skills/entertainement/spotify/__init__.py index 7ee79e1..d37efef 100644 --- a/jarvis/skills/entertainement/spotify/__init__.py +++ b/jarvis/skills/entertainement/spotify/__init__.py @@ -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: