mirror of https://github.com/mpv-player/mpv
TOOLS/autoload: avoid throwing an error when playing e.g. youtube
Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
e157d005ba
commit
0121d00478
|
@ -30,7 +30,12 @@ function add_files_at(index, files)
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_extension(path)
|
function get_extension(path)
|
||||||
return string.match(path, "%.([^%.]+)$" )
|
match = string.match(path, "%.([^%.]+)$" )
|
||||||
|
if match == nil then
|
||||||
|
return "nomatch"
|
||||||
|
else
|
||||||
|
return match
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.filter = function(t, iter)
|
table.filter = function(t, iter)
|
||||||
|
|
Loading…
Reference in New Issue