external_files: recognize webp files as cover art

mpv currently only recognizes jpg and png files named "AlbumArt",
"Album", "cover", etc. which are in the same folder as the audio files
as album/cover art and displays it when playing such audios.

This feature adds support for webp files following the same naming
scheme to be displayed as cover art for albums who have them.

Webp variations are lower in priority compared to jpg or png files.

Resolves: #11006
This commit is contained in:
Ron Shabi 2022-12-26 04:59:09 +02:00 committed by sfan5
parent 4a2aa36674
commit b6c9846112
1 changed files with 8 additions and 0 deletions

View File

@ -50,17 +50,25 @@ static const char *const image_exts[] = {"jpg", "jpeg", "png", "gif", "bmp",
// sorted by priority (descending)
static const char *const cover_files[] = {
"AlbumArt.jpg",
"AlbumArt.webp",
"Album.jpg",
"Album.webp",
"cover.jpg",
"cover.png",
"cover.webp",
"front.jpg",
"front.png",
"front.webp",
"AlbumArtSmall.jpg",
"AlbumArtSmall.webp",
"Folder.jpg",
"Folder.png",
"Folder.webp",
".folder.png",
".folder.webp",
"thumb.jpg",
"thumb.webp",
"front.bmp",
"front.gif",