mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
let the user select caption size
This commit is contained in:
@@ -68,6 +68,7 @@ final class MPVClient: ObservableObject {
|
||||
checkError(mpv_set_option_string(mpv, "vo", "libmpv"))
|
||||
checkError(mpv_set_option_string(mpv, "demuxer-lavf-analyzeduration", "1"))
|
||||
checkError(mpv_set_option_string(mpv, "deinterlace", Defaults[.mpvDeinterlace] ? "yes" : "no"))
|
||||
checkError(mpv_set_option_string(mpv, "sub-scale", "\(Defaults[.captionsFontScaleSize])"))
|
||||
|
||||
checkError(mpv_initialize(mpv))
|
||||
|
||||
@@ -413,6 +414,10 @@ final class MPVClient: ObservableObject {
|
||||
setString("sub", "no")
|
||||
}
|
||||
|
||||
func setSubFontSize() {
|
||||
setString("sub-scale", "\(Defaults[.captionsFontScaleSize])")
|
||||
}
|
||||
|
||||
var tracksCount: Int {
|
||||
Int(getString("track-list/count") ?? "-1") ?? -1
|
||||
}
|
||||
|
Reference in New Issue
Block a user