diff --git a/src/renderer/api/jellyfin/jellyfin-controller.ts b/src/renderer/api/jellyfin/jellyfin-controller.ts index 203443db5..4f77d7035 100644 --- a/src/renderer/api/jellyfin/jellyfin-controller.ts +++ b/src/renderer/api/jellyfin/jellyfin-controller.ts @@ -1039,21 +1039,23 @@ export const JellyfinController: InternalControllerEndpoint = { const { bitrate, format, id, transcode } = query; const deviceId = ''; - let url = - `${server?.url}/audio` + - `/${id}/universal` + - `?userId=${server?.userId}` + - `&deviceId=${deviceId}` + - '&audioCodec=aac' + - `&apiKey=${server?.credential}` + - `&playSessionId=${deviceId}` + - '&container=opus,mp3,aac,m4a,m4b,flac,wav,ogg'; + let url = `${server?.url}/Items/${id}/Download?api_key=${server?.credential}&playSessionId=${deviceId}`; if (transcode) { // Some format appears to be required. Fall back to trusty MP3 if not specified // Otherwise, ffmpeg appears to crash const realFormat = format || 'mp3'; + url = + `${server?.url}/audio` + + `/${id}/universal` + + `?userId=${server?.userId}` + + `&deviceId=${deviceId}` + + '&audioCodec=aac' + + `&apiKey=${server?.credential}` + + `&playSessionId=${deviceId}` + + '&container=opus,mp3,aac,m4a,m4b,flac,wav,ogg'; + url += `&transcodingProtocol=http&transcodingContainer=${realFormat}`; url = url.replace('audioCodec=aac', `audioCodec=${realFormat}`); url = url.replace(