From 91081e91cf19e05300e6008d2cfebc4b96c57ce7 Mon Sep 17 00:00:00 2001 From: Aditya Mehra Date: Fri, 20 Aug 2021 19:45:13 +0930 Subject: [PATCH] Add theme dict and mimetype for radio for guiplayer service --- __init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 2152e06..084ef0f 100644 --- a/__init__.py +++ b/__init__.py @@ -385,7 +385,12 @@ def handle_latest_news(self, message=None, feed=None): wait_while_speaking() # Begin the news stream self.log.info('Feed: {}'.format(feed)) - self.CPS_play(('file://' + self.STREAM, mime)) + if self.gui.connected: + mime = "type/radio" + theme = dict(textColor="white", seekBackgroundColor="#BE1617", spectrumColor="#91D3F8", cardBackgroundColor="#5F0B0C") + self.CPS_play(('file://' + self.STREAM, mime, theme)) + else: + self.CPS_play(('file://' + self.STREAM, mime)) self.CPS_send_status(image=image or image_path('generic.png'), track=self.now_playing) self.last_message = (True, message)