[jsonapi] support composer in queue and track objs

This commit is contained in:
whatdoineed2do/Ray 2018-11-23 14:52:30 +00:00 committed by ejurgensen
parent 488f52b04f
commit cfadcc184f
2 changed files with 4 additions and 0 deletions

View File

@ -1715,6 +1715,7 @@ curl --include \
| album_sort | string | Album sort name |
| album_artist | string | Album artist name |
| album_artist_sort | string | Album artist sort name |
| composer | string | Composer (optional) |
| genre | string | Genre |
| year | integer | Release year |
| track_number | integer | Track number |
@ -1781,6 +1782,7 @@ curl --include \
| album_artist | string | Album artist name |
| album_artist_sort | string | Album artist sort name |
| album_artist_id | string | Album artist id |
| composer | string | Track composer |
| genre | string | Genre |
| year | integer | Release year |
| track_number | integer | Track number |

View File

@ -190,6 +190,7 @@ track_to_json(struct db_media_file_info *dbmfi)
safe_json_add_string(item, "album_artist", dbmfi->album_artist);
safe_json_add_string(item, "album_artist_sort", dbmfi->album_artist_sort);
safe_json_add_string(item, "album_artist_id", dbmfi->songartistid);
safe_json_add_string(item, "composer", dbmfi->composer);
safe_json_add_string(item, "genre", dbmfi->genre);
safe_json_add_int_from_string(item, "year", dbmfi->year);
safe_json_add_int_from_string(item, "track_number", dbmfi->track);
@ -1535,6 +1536,7 @@ queue_item_to_json(struct db_queue_item *queue_item, char shuffle)
safe_json_add_string(item, "album_sort", queue_item->album_sort);
safe_json_add_string(item, "album_artist", queue_item->album_artist);
safe_json_add_string(item, "album_artist_sort", queue_item->album_artist_sort);
safe_json_add_string(item, "composer", queue_item->composer);
safe_json_add_string(item, "genre", queue_item->genre);
json_object_object_add(item, "year", json_object_new_int(queue_item->year));