mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Fix smart & default subtitle selection logic (#579)
## Description Fixes the logic for subtitle selection when using `Smart` or `Default` server modes. Also takes into account unknown languages. This is heavily inspired by [the server selection logic](https://github.com/jellyfin/jellyfin/blob/release-10.11.z/Emby.Server.Implementations/Library/MediaStreamSelector.cs). For better or for worse, Wholphin implements this client side. ### Related issues Fixes #570
This commit is contained in:
parent
fd1feddab3
commit
494ff07b72
6 changed files with 591 additions and 25 deletions
|
|
@ -61,7 +61,7 @@ class ItemPlaybackRepository
|
|||
)
|
||||
val subtitleStream =
|
||||
streamChoiceService.chooseSubtitleStream(
|
||||
audioStream = audioStream,
|
||||
audioStreamLang = audioStream?.language,
|
||||
candidates =
|
||||
source.mediaStreams
|
||||
?.filter { it.type == MediaStreamType.SUBTITLE }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue