From: Marcel van der Veldt Date: Wed, 17 Aug 2022 23:32:29 +0000 (+0200) Subject: fix playback of local files X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=789eaf6ea12be9d8d354f43d5d046f18a8ce23d6;p=music-assistant-server.git fix playback of local files --- diff --git a/music_assistant/helpers/audio.py b/music_assistant/helpers/audio.py index ac244237..37c14f66 100644 --- a/music_assistant/helpers/audio.py +++ b/music_assistant/helpers/audio.py @@ -697,18 +697,20 @@ async def _get_ffmpeg_args( ] if streamdetails.direct: # ffmpeg can access the inputfile (or url) directly - input_args += [ - "-reconnect", - "1", - "-reconnect_streamed", - "1", - "-reconnect_on_network_error", - "1", - "-reconnect_on_http_error", - "5xx", - "-reconnect_delay_max", - "10", - ] + if streamdetails.direct.startswith("http"): + # append reconnect options for direct stream from http + input_args += [ + "-reconnect", + "1", + "-reconnect_streamed", + "1", + "-reconnect_on_network_error", + "1", + "-reconnect_on_http_error", + "5xx", + "-reconnect_delay_max", + "10", + ] if seek_position: input_args += ["-ss", str(seek_position)] input_args += ["-i", streamdetails.direct]