From 32efebe405dd54c8c163c0fb0be145c4aa2c053a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 16 Jun 2019 21:54:03 +0200 Subject: [PATCH] Fixed typos and warnings in snapcast backend --- platypush/backend/music/snapcast.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/backend/music/snapcast.py b/platypush/backend/music/snapcast.py index 9823fa3af8..c660deefdc 100644 --- a/platypush/backend/music/snapcast.py +++ b/platypush/backend/music/snapcast.py @@ -52,10 +52,10 @@ class MusicSnapcastBackend(Backend): super().__init__(*args, **kwargs) - if ports is None: - ports = [self._DEFAULT_SNAPCAST_PORT] if hosts is None: hosts = ['localhost'] + if ports is None: + ports = [self._DEFAULT_SNAPCAST_PORT] self.hosts = hosts[:] self.ports = ports[:] @@ -130,8 +130,8 @@ class MusicSnapcastBackend(Backend): stream_id = msg.get('params', {}).get('stream_id') evt = GroupStreamChangeEvent(host=host, group=group_id, stream=stream_id) elif msg.get('method') == 'Stream.OnUpdate': + stream_id = msg.get('params', {}).get('stream_id') stream = msg.get('params', {}).get('stream') - stream_id = stream.get('id') evt = StreamUpdateEvent(host=host, stream_id=stream_id, stream=stream) elif msg.get('method') == 'Server.OnUpdate': server = msg.get('params', {}).get('server')