Better smart subtitles with no preferred audio language (#789)

## Description
Another small fix to smart subtitle track selection to better handle the
cases where the user does not have a preferred audio language.

### Related issues
Addresses issue raises in
https://github.com/damontecres/Wholphin/issues/570#issuecomment-3714629517
This commit is contained in:
Ray 2026-01-28 13:56:33 -05:00 committed by GitHub
parent 5975302fb9
commit f787e9ce1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 3 deletions

View file

@ -355,7 +355,7 @@ class TestStreamChoiceServiceSmart(
userAudioLang = null,
),
TestInput(
1,
null,
SubtitlePlaybackMode.SMART,
subtitles =
listOf(
@ -367,6 +367,18 @@ class TestStreamChoiceServiceSmart(
userSubtitleLang = "eng",
userAudioLang = null,
),
TestInput(
null,
SubtitlePlaybackMode.SMART,
subtitles =
listOf(
subtitle(0, "eng"),
subtitle(1, "spa"),
),
streamAudioLang = "spa",
userSubtitleLang = "spa",
userAudioLang = null,
),
)
}
}
@ -498,7 +510,7 @@ class TestStreamChoiceServiceMultipleChoices(
),
),
TestInput(
2,
0,
SubtitlePlaybackMode.SMART,
subtitles =
listOf(