mpv
mpv copied to clipboard
Exclude unwanted files in folders
Before requesting a new feature make sure it hasn't been requested yet. https://github.com/mpv-player/mpv/labels/meta%3Afeature-request
Expected behavior of the wanted feature
When loading a folder or directory mpv would recursively add all files in it and it's subdirectories. Sometimes this behavior makes playlist a mess, for example a folder of music with album photos and lyrics.
It would be nice if mpv could offer an option to exclude such unrelated files by extension.
Alternative behavior of the wanted feature
You can use this script: https://github.com/mpv-player/mpv/issues/2595#issuecomment-808723731
You can use this script: #2595 (comment)
Thanks for your hint. Looks there have been a few similar requests. Scripts are helpful, but still waiting for a native implement in mpv.
You won't get a native implementation, even now the feature you're using is implemented as a script, autoload.lua. You can set it to ignore extensions by type, such as ignore non-music files.
Your next best option, assuming you don't want a userscript, is to make the playlist yourself with another tool and then play that in mpv.
You won't get a native implementation, even now the feature you're using is implemented as a script, autoload.lua. You can set it to ignore extensions by type, such as ignore non-music files.
Your next best option, assuming you don't want a userscript, is to make the playlist yourself with another tool and then play that in mpv.
Loading folder is not implemented by autoload.lua, but the extentions filter feature does meet my demand when loading files in a mixed folder, not loading folder directly. I currently managed to deal with it by adding . prior to non-media filenames, so that mpv would not add these files to playlist.