diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua index 39a39a9686..172924e409 100644 --- a/TOOLS/lua/autoload.lua +++ b/TOOLS/lua/autoload.lua @@ -320,16 +320,20 @@ local function find_and_add_entries() local extensions if o.same_type then - if EXTENSIONS_VIDEO[string.lower(this_ext)] ~= nil then + if EXTENSIONS_VIDEO[this_ext:lower()] then extensions = EXTENSIONS_VIDEO - elseif EXTENSIONS_AUDIO[string.lower(this_ext)] ~= nil then + elseif EXTENSIONS_AUDIO[this_ext:lower()] then extensions = EXTENSIONS_AUDIO - else + elseif EXTENSIONS_IMAGES[this_ext:lower()] then extensions = EXTENSIONS_IMAGES end else extensions = EXTENSIONS end + if not extensions then + msg.debug("stopping: no matched extentions list") + return + end local pl = mp.get_property_native("playlist", {}) local pl_current = mp.get_property_number("playlist-pos-1", 1)