From 410d3a0cfa61b95fd09de451922126e5c44e63f0 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 3 Jan 2025 10:14:23 +0100 Subject: [PATCH] [http] Implement setting to ignore StreamUrl Some radio stations send garbage in the ICY StreamUrl tag, ref issue #1829. --- src/inputs/http.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/inputs/http.c b/src/inputs/http.c index a50e48fc..ad0c26dd 100644 --- a/src/inputs/http.c +++ b/src/inputs/http.c @@ -293,11 +293,14 @@ metadata_prepare(struct input_source *source) // Note we map title to album, because clients should show stream name as title swap_pointers(&prepared_metadata.parsed.album, &m->title); - // In this case we have to go async to download the url and process the content - if (m->url && !artwork_extension_is_artwork(m->url)) - worker_execute(streamurl_cb, m->url, strlen(m->url) + 1, 0); - else - swap_pointers(&prepared_metadata.parsed.artwork_url, &m->url); + if (! SETTINGS_GETBOOL("misc", "streamurl_ignore")) + { + // In this case we have to go async to download the url and process the content + if (m->url && !artwork_extension_is_artwork(m->url)) + worker_execute(streamurl_cb, m->url, strlen(m->url) + 1, 0); + else + swap_pointers(&prepared_metadata.parsed.artwork_url, &m->url); + } http_icy_metadata_free(m, 0); return 0;