mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-26 14:13:18 -05:00
[jsonapi] expose albumid/artistid persistent id on queue object
This commit is contained in:
parent
7e02eb510d
commit
17022c9103
@ -1654,6 +1654,19 @@ queue_item_to_json(struct db_queue_item *queue_item, char shuffle)
|
||||
safe_json_add_string(item, "composer", queue_item->composer);
|
||||
safe_json_add_string(item, "genre", queue_item->genre);
|
||||
|
||||
if (queue_item->songartistid > 0)
|
||||
{
|
||||
ret = snprintf(uri, sizeof(uri), "%" PRIi64, queue_item->songartistid);
|
||||
if (ret < sizeof(uri))
|
||||
json_object_object_add(item, "albumartist_id", json_object_new_string(uri));
|
||||
}
|
||||
if (queue_item->songalbumid > 0)
|
||||
{
|
||||
ret = snprintf(uri, sizeof(uri), "%" PRIi64, queue_item->songalbumid);
|
||||
if (ret < sizeof(uri))
|
||||
json_object_object_add(item, "album_id", json_object_new_string(uri));
|
||||
}
|
||||
|
||||
json_object_object_add(item, "year", json_object_new_int(queue_item->year));
|
||||
json_object_object_add(item, "track_number", json_object_new_int(queue_item->track));
|
||||
json_object_object_add(item, "disc_number", json_object_new_int(queue_item->disc));
|
||||
|
Loading…
x
Reference in New Issue
Block a user