Skip to content

Commit

Permalink
Only specify mediaSourceId if index changed
Browse files Browse the repository at this point in the history
  • Loading branch information
viown committed Oct 5, 2024
1 parent c54db60 commit 4e2a3de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/playback/playbackmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@ export class PlaybackManager {
}

const apiClient = ServerConnections.getApiClient(item.ServerId);
const mediaSourceId = playOptions.mediaSourceId;
let mediaSourceId = playOptions.mediaSourceId;
const getMediaStreams = apiClient.getItem(apiClient.getCurrentUserId(), mediaSourceId || item.Id)
.then(fullItem => {
return fullItem.MediaStreams;
Expand Down Expand Up @@ -2611,9 +2611,11 @@ export class PlaybackManager {
autoSetNextTracks(prevSource, mediaStreams, trackOptions, user.Configuration.RememberAudioSelections, user.Configuration.RememberSubtitleSelections);
if (trackOptions.DefaultAudioStreamIndex != null) {
options.audioStreamIndex = trackOptions.DefaultAudioStreamIndex;
mediaSourceId = playOptions.mediaSourceId || item.Id;
}
if (trackOptions.DefaultSubtitleStreamIndex != null) {
options.subtitleStreamIndex = trackOptions.DefaultSubtitleStreamIndex;
mediaSourceId = playOptions.mediaSourceId || item.Id;
}

return getPlaybackMediaSource(player, apiClient, deviceProfile, item, mediaSourceId, options).then(async (mediaSource) => {
Expand Down

0 comments on commit 4e2a3de

Please sign in to comment.