Skip to content

Commit

Permalink
fix: fix default audio stream sort for boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbenincasa committed Dec 27, 2024
1 parent 732e81d commit b298be3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/stream/jellyfin/JellyfinStreamDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export class JellyfinStreamDetails {
firstMediaSource?.MediaStreams,
(stream) => stream.Type === 'Audio',
),
(stream) => [stream.Index ?? 0, !!stream.IsDefault],
(stream) => [stream.Index ?? 0, !stream.IsDefault],
),
(audioStream) => {
return {
Expand Down
5 changes: 4 additions & 1 deletion server/src/stream/plex/PlexStreamDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ export class PlexStreamDetails {
filter(mediaStreams, (stream): stream is PlexMediaAudioStream => {
return stream.streamType === 2;
}),
(stream) => [stream.index, stream.selected ?? stream.default ?? false],
(stream) => [
stream.index,
!(stream.selected ?? stream.default ?? false),
],
),
(audioStream) => {
return {
Expand Down

0 comments on commit b298be3

Please sign in to comment.