From ca3c7015c68d08842187079e0c21e4e8ab226f96 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Tue, 7 Apr 2026 17:28:46 -0700 Subject: [PATCH] add fallback to direct streamURL if getTranscodeDecision fails --- src/renderer/api/subsonic/subsonic-controller.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/api/subsonic/subsonic-controller.ts b/src/renderer/api/subsonic/subsonic-controller.ts index 2def2323c..4b1cd373d 100644 --- a/src/renderer/api/subsonic/subsonic-controller.ts +++ b/src/renderer/api/subsonic/subsonic-controller.ts @@ -2015,8 +2015,12 @@ export const SubsonicController: InternalControllerEndpoint = { }, }); + // If the server returns an error for transcodeDecision, fall back to direct stream so that we don't break the player if (transcodeDecision.status !== 200) { - throw new Error('Failed to get transcode decision'); + logFn.error( + `Failed to get transcode decision for song ${id}, falling back to direct stream`, + ); + return streamUrl; } const td = transcodeDecision.body.transcodeDecision;