add fallback to direct streamURL if getTranscodeDecision fails

This commit is contained in:
jeffvli
2026-04-07 17:28:46 -07:00
parent c7c15d917a
commit ca3c7015c6
@@ -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) { 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; const td = transcodeDecision.body.transcodeDecision;