This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dualsubs() | |
local i = 0 | |
local tracks_count = mp.get_property_number("track-list/count") | |
while i < tracks_count do | |
local track_type = mp.get_property(string.format("track-list/%d/type", i)) | |
local track_lang = mp.get_property(string.format("track-list/%d/lang", i)) | |
local track_id = mp.get_property(string.format("track-list/%d/id", i)) | |
if track_type == "sub" then | |
if string.match(track_lang, "en") then |