[db/readme] Add comment to browse_info object; update docs for genre

endpoint
This commit is contained in:
chme 2021-12-29 12:01:42 +01:00
parent 8becdee8f1
commit 8dfbb460c2
2 changed files with 13 additions and 3 deletions

View File

@ -1677,7 +1677,7 @@ GET /api/library/genres
| Key | Type | Value |
| --------------- | -------- | ----------------------------------------- |
| items | array | Array of [`genre`](#genre-object) objects |
| items | array | Array of [`browse-info`](#browse-info-object) objects |
| total | integer | Total number of genres in the library |
| offset | integer | Requested offset of the first genre |
| limit | integer | Requested maximum number of genres |
@ -2604,11 +2604,17 @@ curl --include \
| limit | integer | Requested maximum number of items |
### `genre` object
### `browse-info` object
| Key | Type | Value |
| --------------- | -------- | ----------------------------------------- |
| name | string | Name of genre |
| name | string | Name (depends on the type of the query) |
| name_sort | string | Sort name |
| artist_count | integer | Number of artists |
| album_count | integer | Number of albums |
| track_count | integer | Number of tracks |
| time_played | string | Timestamp in `ISO 8601` format |
| time_added | string | Timestamp in `ISO 8601` format |
### `directory` object

View File

@ -409,6 +409,10 @@ struct db_media_file_info {
#define dbmfi_offsetof(field) offsetof(struct db_media_file_info, field)
/* Info object for generic browse queries that want more info than just
* the item string and sort string (e. g. for genre or compose queries
* that want to display the total track / album count).
*/
struct db_browse_info {
char *itemname;
char *itemname_sort;