Improved Captions handling

New options for captions in `Settings-Player`:

- Always show captions
- Default language

User can now select whether they want to show captions automatically when the video starts, and select the language.

Captions selector now shows proper name -> `English (en)` instead of only `en`
This commit is contained in:
Toni Förster
2024-05-20 02:49:32 +02:00
parent 90777d91f6
commit 4db02b2638
7 changed files with 168 additions and 9 deletions

View File

@@ -405,6 +405,14 @@ final class MPVClient: ObservableObject {
setString("video", "no")
}
func setSubToAuto() {
setString("sub", "auto")
}
func setSubToNo() {
setString("sub", "no")
}
var tracksCount: Int {
Int(getString("track-list/count") ?? "-1") ?? -1
}