Skip to content

Commit

Permalink
fix: use stream.selected over stream.default for plex audio streams
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbenincasa committed Dec 27, 2024
1 parent 820282d commit 1a8afb6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/stream/plex/PlexStreamDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ export class PlexStreamDetails {
channels: audioStream.channels,
codec: audioStream.codec,
index: audioStream.index?.toString() ?? 'a', // Fallback for legacy pipeline
default: audioStream.default,
// Use the "selected" bit over the "default" if it exists
// In plex, selected signifies that the user's preferences would choose
// this stream over others, even if it is not the default
// This is temporary until we have language preferences within Tunarr
// to pick these streams.
default: audioStream.selected ?? audioStream.default,
language: audioStream.languageCode,
title: audioStream.displayTitle,
} satisfies AudioStreamDetails;
Expand Down

0 comments on commit 1a8afb6

Please sign in to comment.