[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.
This commit is contained in:
ejurgensen 2020-02-19 22:58:33 +01:00
parent b43e174baf
commit 2651a979fe

View File

@ -144,12 +144,9 @@ 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);
// 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);
http_icy_metadata_free(m, 0);