From c7711d75a158b305f805cbd6d3f0b140af18c45a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 11 Nov 2020 03:07:42 +0100 Subject: [PATCH] New pychromecast has replaced host/port with uri --- platypush/plugins/media/chromecast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/media/chromecast.py b/platypush/plugins/media/chromecast.py index 48c152c9d..1b70a99d9 100644 --- a/platypush/plugins/media/chromecast.py +++ b/platypush/plugins/media/chromecast.py @@ -173,8 +173,8 @@ class MediaChromecastPlugin(MediaPlugin): 'manufacturer': cc.device.manufacturer, 'model_name': cc.model_name, 'uuid': str(cc.device.uuid), - 'address': cc.host, - 'port': cc.port, + 'address': cc.host if hasattr(cc, 'host') else cc.uri.split(':')[0], + 'port': cc.port if hasattr(cc, 'port') else int(cc.uri.split(':')[1]), 'status': ({ 'app': {