Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Oct 24, 2024
1 parent dbf7203 commit 8a96c62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion music_assistant/server/controllers/players.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions music_assistant/server/models/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions music_assistant/server/providers/apple_music/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8a96c62

Please sign in to comment.