autoload.lua: match also image extension

For clarity, it is already matched if extention is in EXTENSIONS if
pl_count == 1.
This commit is contained in:
Kacper Michajłow 2024-06-04 02:42:21 +02:00
parent 8dcd5ea288
commit a64a5c2222
1 changed files with 7 additions and 3 deletions

View File

@ -320,16 +320,20 @@ local function find_and_add_entries()
local extensions local extensions
if o.same_type then if o.same_type then
if EXTENSIONS_VIDEO[string.lower(this_ext)] ~= nil then if EXTENSIONS_VIDEO[this_ext:lower()] then
extensions = EXTENSIONS_VIDEO extensions = EXTENSIONS_VIDEO
elseif EXTENSIONS_AUDIO[string.lower(this_ext)] ~= nil then elseif EXTENSIONS_AUDIO[this_ext:lower()] then
extensions = EXTENSIONS_AUDIO extensions = EXTENSIONS_AUDIO
else elseif EXTENSIONS_IMAGES[this_ext:lower()] then
extensions = EXTENSIONS_IMAGES extensions = EXTENSIONS_IMAGES
end end
else else
extensions = EXTENSIONS extensions = EXTENSIONS
end end
if not extensions then
msg.debug("stopping: no matched extentions list")
return
end
local pl = mp.get_property_native("playlist", {}) local pl = mp.get_property_native("playlist", {})
local pl_current = mp.get_property_number("playlist-pos-1", 1) local pl_current = mp.get_property_number("playlist-pos-1", 1)