This commit is contained in:
Damontecres 2025-11-05 23:21:51 -05:00
parent 76825529b9
commit c545ddf75a
No known key found for this signature in database
2 changed files with 32 additions and 11 deletions

View file

@ -437,7 +437,7 @@ class PlaybackViewModel
"changeStreams: userInitiated=$userInitiated, audioIndex=$audioIndex, subtitleIndex=$subtitleIndex, " +
"enableDirectPlay=$enableDirectPlay, enableDirectStream=$enableDirectStream",
)
val playerBackend = preferences.appPreferences.playbackPreferences.playerBackend
// TODO if the new audio or subtitle index is already in the streams (eg direct play), should toggle in the player instead
val maxBitrate =
preferences.appPreferences.playbackPreferences.maxBitrate
@ -448,7 +448,12 @@ class PlaybackViewModel
itemId,
PlaybackInfoDto(
startTimeTicks = null,
deviceProfile = deviceProfile,
deviceProfile =
if (playerBackend == PlayerBackend.EXO_PLAYER) {
deviceProfile
} else {
null
},
maxAudioChannels = null,
audioStreamIndex = audioIndex,
subtitleStreamIndex = subtitleIndex,
@ -491,6 +496,7 @@ class PlaybackViewModel
}
val transcodeType =
when {
playerBackend == PlayerBackend.MPV -> PlayMethod.DIRECT_PLAY
source.supportsDirectPlay -> PlayMethod.DIRECT_PLAY
source.supportsDirectStream -> PlayMethod.DIRECT_STREAM
source.supportsTranscoding -> PlayMethod.TRANSCODE