From d692afcff131e6bd5f9ab8ba5bcdf825b8329228 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 21 May 2024 14:02:01 +0200 Subject: accept mime-types for MPEG-4 audio for artwork Looks like libmagic gives the mime-types 'audio/mp4' and 'audio/x-m4a' for these... Fixes #45 --- mpd-notification.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mpd-notification.c b/mpd-notification.c index 2e48bb0..fdfa760 100644 --- a/mpd-notification.c +++ b/mpd-notification.c @@ -105,7 +105,9 @@ GdkPixbuf * retrieve_artwork(const char * music_dir, const char * uri) { if (verbose > 0) printf("%s: MIME type for %s is: %s\n", program, uri_path, magic_mime); - if (strcmp(magic_mime, "audio/mpeg") != 0) + if (strcmp(magic_mime, "audio/mp4") != 0 && + strcmp(magic_mime, "audio/mpeg") != 0 && + strcmp(magic_mime, "audio/x-m4a") != 0) goto image; if ((pFormatCtx = avformat_alloc_context()) == NULL) { -- cgit v1.2.3-70-g09d2