mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Exclude unwanted files in folders

Open escapezn opened this issue 3 years ago • 4 comments

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

escapezn avatar Dec 29 '21 17:12 escapezn

You can use this script: https://github.com/mpv-player/mpv/issues/2595#issuecomment-808723731

guidocella avatar Dec 29 '21 17:12 guidocella

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.

escapezn avatar Dec 29 '21 18:12 escapezn

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.

LaserEyess avatar Dec 29 '21 21:12 LaserEyess

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.

escapezn avatar Dec 30 '21 02:12 escapezn