From: Marcel van der Veldt Date: Thu, 13 Mar 2025 21:49:22 +0000 (+0100) Subject: Fix queue item duration with fixed content length X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=37c56b1f868bd6006c637e4512c0b0f140f866b4;p=music-assistant-server.git Fix queue item duration with fixed content length --- diff --git a/music_assistant/controllers/streams.py b/music_assistant/controllers/streams.py index 552299d9..74bcffde 100644 --- a/music_assistant/controllers/streams.py +++ b/music_assistant/controllers/streams.py @@ -385,7 +385,10 @@ class StreamsController(CoreController): http_profile: str = await self.mass.config.get_player_config_value( queue_id, CONF_HTTP_PROFILE ) - if http_profile == "forced_content_length" and queue_item.duration: + if http_profile == "forced_content_length" and not queue_item.duration: + # just set an insane high content length to make sure the player keeps playing + resp.content_length = get_chunksize(output_format, 12 * 3600) + elif http_profile == "forced_content_length": # guess content length based on duration resp.content_length = get_chunksize(output_format, queue_item.duration) elif http_profile == "chunked":