blob: 7a64028687536ffacc29f348ca36180b2c8162a8 (
plain)
1
2
3
4
5
6
7
8
9
10
|
mp.observe_property('playlist-count', 'number', function ()
local playlist = mp.get_property_native('playlist')
for i = #playlist, 1, -1 do
for _, extension in pairs({'cue', 'txt', 'jpg', 'jpeg', 'png', 'log', 'description', 'en.vtt', 'info.json', 'webp'}) do
if playlist[i].filename:match('%.' .. extension .. '$') then
mp.commandv('playlist-remove', i-1)
end
end
end
end)
|