Skip to content

Commit

Permalink
Fix: some very minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jan 15, 2025
1 parent b99e234 commit a267ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion music_assistant/controllers/player_queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,9 @@ def on_player_update(
else None,
"image_url": self.mass.metadata.get_image_url(
prev_item.media_item.image, size=512
),
)
if prev_item.media_item.image
else None,
"duration": getattr(prev_item.media_item, "duration", 0),
"mbid": getattr(prev_item.media_item, "mbid", None),
},
Expand Down
4 changes: 2 additions & 2 deletions music_assistant/helpers/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ async def get_media_stream(
async for chunk in TimedAsyncGenerator(
ffmpeg_proc.iter_chunked(pcm_format.pcm_sample_size), timeout=30
):
# for radio streams we just yield all chunks directly
if streamdetails.media_type == MediaType.RADIO:
# for non-tracks we just yield all chunks directly
if streamdetails.media_type != MediaType.TRACK:
yield chunk
bytes_sent += len(chunk)
continue
Expand Down

0 comments on commit a267ed0

Please sign in to comment.