We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdb2779 commit 1fe2606Copy full SHA for 1fe2606
mpv-sub_not_forced.lua
@@ -0,0 +1,12 @@
1
+function select_not_forced_subtitle()
2
+ local last_sub = nil
3
+ for i, sub in ipairs(mp.get_property_native("track-list")) do
4
+ if sub.type == "sub" and not sub.forced and (sub.title == nil or not sub.title:find("SDH")) then
5
+ last_sub = sub
6
+ end
7
8
+ if last_sub then
9
+ mp.set_property("sid", tostring(last_sub.id))
10
11
+end
12
+mp.register_event("file-loaded", select_not_forced_subtitle)
0 commit comments