From 86bb958754c657cee09cab852acc190c6d5d7315 Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Tue, 17 Dec 2024 22:03:03 +0100 Subject: [PATCH] Remove invalid item id usage as media source id Looking at the change history, it looks like an accidental ` || item.Id` was introduced in 4c31742cc50c19702f2c1610c2bcfc0d6c4d210b to query for the item, perhaps not realising it is later used in the query later on for server-side filtering. This was partially fixed by c54db604d9426f3b3d46222c9161b88aa210d4da and ca4763512f4a4e2a73e37600a5dc520f917c2274 for Live TV by not setting this variable in that case. --- src/components/playback/playbackmanager.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index c5f5182cc89c..bd32455fd8f7 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -2581,15 +2581,10 @@ export class PlaybackManager { } const apiClient = ServerConnections.getApiClient(item.ServerId); - let mediaSourceId; - + const mediaSourceId = playOptions.mediaSourceId; const isLiveTv = [BaseItemKind.TvChannel, BaseItemKind.LiveTvChannel].includes(item.Type); - if (!isLiveTv) { - mediaSourceId = playOptions.mediaSourceId || item.Id; - } - - const getMediaStreams = isLiveTv ? Promise.resolve([]) : apiClient.getItem(apiClient.getCurrentUserId(), mediaSourceId) + const getMediaStreams = isLiveTv ? Promise.resolve([]) : apiClient.getItem(apiClient.getCurrentUserId(), mediaSourceId || item.Id) .then(fullItem => { return fullItem.MediaStreams; });