From 37c56b1f868bd6006c637e4512c0b0f140f866b4 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 13 Mar 2025 22:49:22 +0100 Subject: [PATCH] Fix queue item duration with fixed content length --- music_assistant/controllers/streams.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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": -- 2.34.1