Random player

Random player 1.0.0

Thanks for this! FYI it incorrectly added escaping forward slashes to spaces in filenames on linux, breaking it from being able to load the files.
I did a fix for myself to substitute a backslash followed by a space with just a space in the for loop for loading files (between lines 90 and 91 in the existing script)
Code:
    for file in p:lines() do
        for _, ext in ipairs(file_extensions) do
            if file:lower():match("%." .. ext:lower() .. "$") then
                file = file:gsub("\\ ", " ")
                table.insert(files, folder_path .. path_sep .. file)
                break
            end
        end
    end
but I assume that would break it on Windows. I don't currently have a setup I can test on and the last time I touched lua it was for conky configs a decade ago, so I didn't feel up to taking a stab at a real implementation, but probably worth making it os-neutral.
 
Back
Top