diff --git a/music_assistant/server/controllers/players.py b/music_assistant/server/controllers/players.py index ffb188188..b36519a7a 100644 --- a/music_assistant/server/controllers/players.py +++ b/music_assistant/server/controllers/players.py @@ -853,7 +853,7 @@ def update( # signal update to the playerqueue self.mass.player_queues.on_player_update(player, changed_values) - if changed_values != {"elapsed_time"} or force_update: + if changed_values.keys() != {"elapsed_time"} or force_update: # ignore elapsed_time only changes self.mass.signal_event(EventType.PLAYER_UPDATED, object_id=player_id, data=player) diff --git a/music_assistant/server/models/provider.py b/music_assistant/server/models/provider.py index 81db5e774..dc415a4ce 100644 --- a/music_assistant/server/models/provider.py +++ b/music_assistant/server/models/provider.py @@ -88,6 +88,8 @@ def instance_id(self) -> str: @property def name(self) -> str: """Return (custom) friendly name for this provider instance.""" + if self.config.name: + return self.config.name inst_count = len([x for x in self.mass.music.providers if x.domain == self.domain]) if inst_count > 1: postfix = self.instance_id[:-8] diff --git a/music_assistant/server/providers/apple_music/__init__.py b/music_assistant/server/providers/apple_music/__init__.py index 8ae48b40f..03d69a540 100644 --- a/music_assistant/server/providers/apple_music/__init__.py +++ b/music_assistant/server/providers/apple_music/__init__.py @@ -356,6 +356,8 @@ async def get_stream_details(self, item_id: str) -> StreamDetails: stream_metadata = await self._fetch_song_stream_metadata(item_id) license_url = stream_metadata["hls-key-server-url"] stream_url, uri = await self._parse_stream_url_and_uri(stream_metadata["assets"]) + if not stream_url or not uri: + raise MediaNotFoundError("No stream URL found for song.") key_id = base64.b64decode(uri.split(",")[1]) return StreamDetails( item_id=item_id,