From bb434297ca66e3c9840c82f43aec9ea9f6238575 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 15 May 2020 23:10:43 +0200 Subject: [PATCH] [artwork] Be more forgiving towards incorrect mime content-types --- src/artwork.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/artwork.c b/src/artwork.c index ab9fd4a5..4b536ba6 100644 --- a/src/artwork.c +++ b/src/artwork.c @@ -440,9 +440,9 @@ artwork_read_byurl(struct evbuffer *evbuf, const char *url) } content_type = keyval_get(kv, "Content-Type"); - if (content_type && (strcmp(content_type, "image/jpeg") == 0)) + if (content_type && (strcasecmp(content_type, "image/jpeg") == 0 || strcasecmp(content_type, "image/jpg") == 0)) ret = ART_FMT_JPEG; - else if (content_type && (strcmp(content_type, "image/png") == 0)) + else if (content_type && strcasecmp(content_type, "image/png") == 0) ret = ART_FMT_PNG; else {