New pychromecast has replaced host/port with uri

This commit is contained in:
Fabio Manganiello 2020-11-11 03:07:42 +01:00
parent 711ea543bb
commit c7711d75a1

View file

@ -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': {