From 2651a979fe7412bc304850842228bbff3e1c6edd Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 19 Feb 2020 22:58:33 +0100 Subject: [PATCH] [inputs] Fix issue where input metadata would not be erased When playing a stream, the input metadata is transferred to the queue_item. However, that was not done if there was no input metadata, which meant that old metadata was not getting erased. --- src/inputs/file_http.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/inputs/file_http.c b/src/inputs/file_http.c index 01ff0e20..5206fee3 100644 --- a/src/inputs/file_http.c +++ b/src/inputs/file_http.c @@ -144,13 +144,10 @@ metadata_get_http(struct input_metadata *metadata, struct input_source *source) return -1; // TODO Perhaps a problem since this prohibits the player updating metadata } - if (m->artist) - swap_pointers(&metadata->artist, &m->artist); + swap_pointers(&metadata->artist, &m->artist); // Note we map title to album, because clients should show stream name as titel - if (m->title) - swap_pointers(&metadata->album, &m->title); - if (m->artwork_url) - swap_pointers(&metadata->artwork_url, &m->artwork_url); + swap_pointers(&metadata->album, &m->title); + swap_pointers(&metadata->artwork_url, &m->artwork_url); http_icy_metadata_free(m, 0); return 0;