From 6c44bcc3fd33473333a8202d7a3fc126ef4bfeda Mon Sep 17 00:00:00 2001 From: Eric Munson Date: Tue, 25 Mar 2025 14:21:36 -0400 Subject: [PATCH] FIx: Subsonic: Don't pass container type to StreamDetails (#2061) This may be causing confusion when transcoding is in use on the Subsonic server. Better to let ffmpeg detect the container type than to give it incorrect information. Signed-off-by: Eric B Munson --- .../providers/opensubsonic/sonic_provider.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/music_assistant/providers/opensubsonic/sonic_provider.py b/music_assistant/providers/opensubsonic/sonic_provider.py index 8eeb6fb0..67929377 100644 --- a/music_assistant/providers/opensubsonic/sonic_provider.py +++ b/music_assistant/providers/opensubsonic/sonic_provider.py @@ -782,10 +782,13 @@ class OpenSonicProvider(MusicProvider): "Due to the streaming method used by the subsonic API, M4A files " "may fail. See provider documentation for more information." ) - mime_type = "?" - # For mp3 files, ffmpeg wants to be told 'mp3' instead of 'audio/mpeg' - elif mime_type.endswith("mpeg"): - mime_type = item.suffix + + # We believe that reporting the container type here is causing playback problems and ffmpeg + # should be capable of guessing the correct container type for any media supported by + # OpenSubsonic servers. Better to let ffmpeg figure things out than tell it something + # confusing. We still go through the effort of figuring out what the server thinks the + # container is to warn about M4A files. + mime_type = "?" return StreamDetails( item_id=item.id, -- 2.34.1