mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-14 16:26:17 -04:00
[player] Only update queue item in metadata_update_cb on changed
metadata. This avoids an unnecessary update query and queue change notification (leading to clients requesting the unchanged queue).
This commit is contained in:
parent
2ee02d407b
commit
0b07cff633
@ -385,6 +385,9 @@ metadata_update_cb(void *arg)
|
||||
goto out_free_metadata;
|
||||
}
|
||||
|
||||
// Update queue item if metadata changed
|
||||
if (metadata->artist || metadata->title || metadata->album || metadata->genre || metadata->artwork_url || metadata->song_length)
|
||||
{
|
||||
// Since we won't be using the metadata struct values for anything else than
|
||||
// this we just swap pointers
|
||||
if (metadata->artist)
|
||||
@ -406,6 +409,7 @@ metadata_update_cb(void *arg)
|
||||
DPRINTF(E_LOG, L_PLAYER, "Database error while updating queue with new metadata\n");
|
||||
goto out_free_queueitem;
|
||||
}
|
||||
}
|
||||
|
||||
o_metadata = outputs_metadata_prepare(metadata->item_id);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user