mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
add fallback to direct streamURL if getTranscodeDecision fails
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user