MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Customizable regex for albumart filenames

Open dgcampea opened this issue 2 years ago • 0 comments

Feature request

Allow albumart to search for files given by a user regex (by a directive in mpd.conf).

This would allow case-insensitive searches and images with non-uniform names across a music_directory (such as Image001 or Image00001) in a client-agnostic manner.

Usually clients implement something similar but it depends on the client being able to read the music_directory as a locally mounted directory. Under proxy/satellite setups or if music_directory is not available locally (or readable) to the client, this doesn't work.

A sane default value could be ^\.?(album|cover|folder|front).*\.(gif|jpeg|jpg|png|webp)$ (based on mpdevil client default regex)

An optional but useful "extension" would be to allow passing metadata tags as a variable to search within the regex expression, an example implementation is mpdevil %AlbumArtist% and %Album% variables. (usage example: ^\.?(album|cover|folder|front|%AlbumArtist%|%Album%).*\.(gif|jpeg|jpg|png|webp)$)

dgcampea avatar Mar 24 '22 15:03 dgcampea