mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-02 17:36:00 -05:00
[http] Implement setting to ignore StreamUrl
Some radio stations send garbage in the ICY StreamUrl tag, ref issue #1829.
This commit is contained in:
parent
76b5da0f0d
commit
410d3a0cfa
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user