From 04b81a73803c6f6774e5f126a5c93644c1a86585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Wed, 23 May 2018 14:04:15 +0200 Subject: [PATCH] Add shutdown method to chromecast The default method for the services call stop, in the chromecast case this isn't desirable since any playing application would be shutdown (even if mycroft didn't initiate it). This overrides default behaviour and will merely disconnect from the device at shutdown. --- mycroft/audio/services/chromecast/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mycroft/audio/services/chromecast/__init__.py b/mycroft/audio/services/chromecast/__init__.py index 10f206c223..18d5f779b4 100644 --- a/mycroft/audio/services/chromecast/__init__.py +++ b/mycroft/audio/services/chromecast/__init__.py @@ -139,6 +139,10 @@ class ChromecastService(AudioBackend): ret['album'] = '' return ret + def shutdown(self): + """ Disconnect from the device. """ + self.cast.disconnect() + def autodetect(config, emitter): """