summaryrefslogtreecommitdiffstats
path: root/TOOLS/lua/autoload.lua
Commit message (Collapse)AuthorAgeFilesLines
* TOOLS/autoload: Fixed broken "disabled" optionAndreas Wennerberg2018-06-231-0/+1
| | | | `--script-opts=autoload-disabled=yes` now properly stops the script from running.
* TOOLS/autoload: be more robust with slow directory listingsRicardo Constantino2018-03-101-11/+24
| | | | | | | | | | Overall, just shuffled code around and added a few debugging messages for future issues. The issue could be reproduced easily by quickly navigating through the playlist inside a network mount. Closes #5618
* TOOLS/autoload.lua: update extensionsCkat2017-12-031-1/+1
| | | | | * duplicated 'ogv' renamed to 'ogm' * 'ogg' and 'opus' added as common audio file extensions
* TOOLS/autoload.lua: implement natural sortingRicardo Constantino2017-08-161-9/+32
|
* TOOLS/lua/autoload.lua: ignores all files starting with "."Yue Zhu2017-05-201-0/+3
|
* TOOLS/lua/autoload.lua: actually sort files case insensitiveRicardo Constantino2017-05-041-1/+2
| | | | | Regression since 8996f79edbf. Closes #4398
* TOOLS/autoload: allow disabling through script-optsRicardo Constantino2016-12-051-1/+8
| | | | | | | | | | | This allows leaving autoload in auto-loaded scripts and to be used in a special profile like "pseudo-gui" without being troublesome to disable the behavior in profiles that get applied after pseudo-gui. Ex: [someprofile] script-opts=autoload-disabled=yes
* Use - as command-name separator everywhereTimotej Lazar2016-07-141-1/+1
| | | | | | | Old-style commands using _ as separator (e.g. show_progress) were still used in some places, including documentation and configuration files. This commit updates all such instances to the new style (show-progress) so that commands are easier to find in the manual.
* TOOLS/lua/autoload.lua: remove the extension prior to sortAlexis Nootens2016-02-021-0/+5
| | | | | | When the directory contains files named such as xx-14.ext and xx-14.5.ext, remove the extension to sort the table to load the 14 before the 14.5.
* TOOLS/autoload: avoid throwing an error when playing e.g. youtubebitingsock2015-10-201-1/+6
| | | | Signed-off-by: wm4 <wm4@nowhere>
* TOOLS/lua/autoload: fix adding more files at end of auto-playlistRicardo Constantino2015-08-201-2/+5
| | | | | | | | | 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.
* TOOLS/lua/autoload: add all files on startwm42015-08-201-2/+2
| | | | | | Or almost. I don't know or care. Fixes #2219 (maybe, I don't know or care).
* TOOLS/lua/autoload: don't run if playlist is loadedRicardo Constantino2015-08-101-0/+4
|
* TOOLS/autoload: load only files that make senseMarcin Kurczewski2015-04-211-0/+30
|
* TOOLS/autoload: add blank lines for readabilityMarcin Kurczewski2015-04-211-0/+7
|
* TOOLS: autoload.lua: sort files case insensitivewm42015-04-181-1/+3
| | | | | Suggested by a user. The suggested code which was added her comes from PIL.
* TOOLS/lua/autoload: fix behavior with network URLswm42015-01-031-0/+3
| | | | | readdir() fails if the directory is an URL, so just exit instead of letting the Lua script fail.
* TOOLS/lua/autoload: fix operation outside of working dirwm42014-10-261-3/+7
| | | | Fixes #1222. (This commit is based on a patch posted there.)
* TOOLS/lua/autoload: don't shadow local variablewm42014-10-261-4/+4
| | | | "dir" is already used somewhere above. This was ok, but not nice.
* lua: fix compilation with lua 5.2wm42014-05-261-2/+4
| | | | | | | | | | | Commit e2e450f9 started making use of luaL_register(), but OF COURSE this function disappeared in Lua 5.2, and was replaced with a 5.2-only alternative, slightly different mechanism. So just NIH our own function. This is actually slightly more correct, since it forces the user to call "require" to actually make the module visible for builtin C-only modules other than "mp". Fix autoload.lua accordingly.
* autoload.lua: fix autoloading of files to prependwm42014-05-251-1/+1
| | | | This used the wrong index variable, and thus didn't work.
* TOOLS: add a Lua script to autoload playlist entrieswm42014-05-251-0/+69
This will load other files in the same directory when a single file is played. It's an often requested feature, but we definitely don't want it in the core.