Fixes regression in dfd8a5f that made autoload not add more files at the end of the current playlist if playlist was made by the script. This still prevents loading the script if more than one (media or playlist) file was manually added.
Showing the changes to TOOLS/lua/autoload.lua (1 of 1 file). Show all
Unified · Split
| @@ -47,9 +47,12 @@ function find_and_add_entries() · 46 unmodified lines | ||
| 47 | 47 | if #dir == 0 then |
| 48 | 48 | return |
| 49 | 49 | end |
| 50 | − local isplaylist = mp.get_property("playlist-count") | |
| 51 | − if #isplaylist > 1 then | |
| 50 | + local pl_count = mp.get_property_number("playlist-count", 1) | |
| 51 | + if (pl_count > 1 and autoload == nil) or | |
| 52 | + (pl_count == 1 and EXTENSIONS[string.lower(get_extension(filename))] == nil) then | |
| 52 | 53 | return |
| 54 | + else | |
| 55 | + autoload = true | |
| 53 | 56 | end |
| 54 | 57 | |
| 55 | 58 | local files = mputils.readdir(dir, "files") |