mpvScripts.convert: fix for mpv >0.26.0

See https://gist.github.com/Zehkul/25ea7ae77b30af959be0#gistcomment-2189556

+15
+15
pkgs/applications/video/mpv/scripts/convert.patch
··· 11 -- default options, convert_script.conf is read 12 local options = { 13 bitrate_multiplier = 0.975, -- to make sure the file won’t go over the target file size, set it to 1 if you don’t care 14 @@ -354,9 +358,9 @@ 15 if ovc == "gif" then 16 full_command = full_command .. ' --vf-add=lavfi=graph=\\"framestep=' .. framestep .. '\\" && convert '
··· 11 -- default options, convert_script.conf is read 12 local options = { 13 bitrate_multiplier = 0.975, -- to make sure the file won’t go over the target file size, set it to 1 if you don’t care 14 + @@ -247,12 +247,12 @@ 15 + if string.len(vf) > 0 then 16 + vf = vf .. "," 17 + end 18 + - local sub_file_table = mp.get_property_native("options/sub-file") 19 + + local sub_file_table = mp.get_property_native("options/sub-files") 20 + local sub_file = "" 21 + for index, param in pairs(sub_file_table) do 22 + sub_file = sub_file .. " --sub-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'" 23 + end 24 + - local audio_file_table = mp.get_property_native("options/audio-file") 25 + + local audio_file_table = mp.get_property_native("options/audio-files") 26 + local audio_file = "" 27 + for index, param in pairs(audio_file_table) do 28 + audio_file = audio_file .. " --audio-file='" .. string.gsub(tostring(param), "'", "'\\''") .. "'" 29 @@ -354,9 +358,9 @@ 30 if ovc == "gif" then 31 full_command = full_command .. ' --vf-add=lavfi=graph=\\"framestep=' .. framestep .. '\\" && convert '