From b956a6f338cf24fec6d22409c7a0d900b13e743e Mon Sep 17 00:00:00 2001 From: lachlan Date: Wed, 9 Oct 2024 16:12:16 +1000 Subject: [PATCH] add totalCount to responses add for `offset` and `count` parameters that make sense * Endpoints * getalbumlist * getalbumlist2 * getnewestpodcasts * getsimilarsongs * getsimilarsongs2 * getsongsbygenre * gettopsongs * search3 * Responses * albumList * albumList2 * newestPodcasts * searchResult3 * similarSongs * similarSongs2 * songsByGenre * topSongs Search3 responses prefix totalCount for each object type add note for unknown, uncalculated, unsupported values tag [OS] Update searchResult3.md Update songsByGenre.md --- content/en/docs/Endpoints/getalbumlist.md | 3 +- content/en/docs/Endpoints/getalbumlist2.md | 3 +- .../en/docs/Endpoints/getnewestpodcasts.md | 57 ++++++++++++++++- content/en/docs/Endpoints/getsimilarsongs.md | 3 +- content/en/docs/Endpoints/getsimilarsongs2.md | 3 +- content/en/docs/Endpoints/getsongsbygenre.md | 62 ++++++++++++++++++- content/en/docs/Endpoints/gettopsongs.md | 3 +- content/en/docs/Endpoints/search3.md | 3 + content/en/docs/Responses/albumList.md | 6 +- content/en/docs/Responses/albumList2.md | 4 +- content/en/docs/Responses/newestPodcasts.md | 4 +- content/en/docs/Responses/searchResult3.md | 8 ++- content/en/docs/Responses/similarSongs.md | 4 +- content/en/docs/Responses/similarSongs2.md | 4 +- content/en/docs/Responses/songsByGenre.md | 56 ++++++++++++++++- content/en/docs/Responses/topSongs.md | 4 +- 16 files changed, 207 insertions(+), 20 deletions(-) diff --git a/content/en/docs/Endpoints/getalbumlist.md b/content/en/docs/Endpoints/getalbumlist.md index 3c03f9a..9d50e38 100644 --- a/content/en/docs/Endpoints/getalbumlist.md +++ b/content/en/docs/Endpoints/getalbumlist.md @@ -1,6 +1,6 @@ --- title: "getAlbumList" -linkTitle: "getAlbumList" +linkTitle: "getAlbumList [OS]" categories: - Lists description: > @@ -42,6 +42,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested "serverVersion": "0.1.3 (tag)", "openSubsonic": true "albumList": { + "totalCount": 2, "album": [ { "id": "200000021", diff --git a/content/en/docs/Endpoints/getalbumlist2.md b/content/en/docs/Endpoints/getalbumlist2.md index 44a9a13..5ff575b 100644 --- a/content/en/docs/Endpoints/getalbumlist2.md +++ b/content/en/docs/Endpoints/getalbumlist2.md @@ -1,6 +1,6 @@ --- title: "getAlbumList2" -linkTitle: "getAlbumList2" +linkTitle: "getAlbumList2 [OS]" categories: - Lists description: > @@ -42,6 +42,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested "serverVersion": "0.1.3 (tag)", "openSubsonic": true "albumList2": { + "totalCount": 2, "album": [ { "id": "200000021", diff --git a/content/en/docs/Endpoints/getnewestpodcasts.md b/content/en/docs/Endpoints/getnewestpodcasts.md index 983df49..48ce9e4 100644 --- a/content/en/docs/Endpoints/getnewestpodcasts.md +++ b/content/en/docs/Endpoints/getnewestpodcasts.md @@ -1,6 +1,6 @@ --- title: "getNewestPodcasts" -linkTitle: "getNewestPodcasts" +linkTitle: "getNewestPodcasts [OS]" categories: - Podcast description: > @@ -28,7 +28,58 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested {{< tabpane persistLang=false >}} {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} -// TODO +{ + "subsonic-response" : { + "status" : "ok", + "version" : "1.16.1", + "newestPodcasts" : { + "totalCount": 2, + "episode" : [ { + "id" : "19", + "parent" : "78", + "isDir" : false, + "title" : "Maria James inquest finding", + "album" : "Trace", + "artist" : "Podcast", + "coverArt" : "78", + "size" : 26734080, + "contentType" : "audio/mpeg", + "suffix" : "mp3", + "duration" : 1113, + "bitRate" : 192, + "playCount" : 0, + "created" : "2023-03-16T01:02:36.481Z", + "type" : "podcast", + "streamId" : "80", + "channelId" : "2", + "description" : "A Victorian Coroner has failed to name a killer in the 1980 cold case of Maria James. Her sons are devasted. But there's still hope, in leads yet to be chased by police.", + "status" : "completed", + "publishDate" : "2022-04-01T02:30:00.000Z" + }, { + "id" : "1", + "parent" : "74", + "isDir" : false, + "title" : "DEVIN TOWNSEND PODCAST #18 - NFT's! Good or bad? Devin discusses with A7X' Matt Shadows...", + "album" : "Devin Townsend Podcast", + "artist" : "Podcast", + "coverArt" : "74", + "size" : 70531702, + "contentType" : "audio/mpeg", + "suffix" : "mp3", + "duration" : 4408, + "bitRate" : 128, + "playCount" : 0, + "created" : "2023-03-16T00:56:16.783Z", + "type" : "podcast", + "streamId" : "76", + "channelId" : "1", + "description" : "People keep talking to me about NFTs...most people seem to hate them and hated that I was even mentioning them =). After I mentioned it on Twitter, Matt hit me up and offered to give me his perspective on them as his band is heavily involved. I watched videos sent to me about the downsides, and here is an example of the other side I suppose. This is just because I'm trying to wrap my head around it. I'm not planning to do NFTs, I just wanted to learn. Take with a grain of salt, and cheers to Matt for being a good sport =)", + "status" : "completed", + "publishDate" : "2022-02-01T12:00:45.000Z" + } ] + } + } +} {{< /tab >}} {{< tab header="Subsonic" lang="json" >}} // TODO @@ -37,4 +88,4 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | -| `newestPodcasts` | [`newestPodcasts`](../../responses/newestpodcasts) | **Yes** | | The podacsts | +| `newestPodcasts` | [`newestPodcasts`](../../responses/newestpodcasts) | **Yes** | | The podcasts | diff --git a/content/en/docs/Endpoints/getsimilarsongs.md b/content/en/docs/Endpoints/getsimilarsongs.md index 367fccb..92b5ba7 100644 --- a/content/en/docs/Endpoints/getsimilarsongs.md +++ b/content/en/docs/Endpoints/getsimilarsongs.md @@ -1,6 +1,6 @@ --- title: "getSimilarSongs" -linkTitle: "getSimilarSongs" +linkTitle: "getSimilarSongs [OS]" categories: - Browsing description: > @@ -103,6 +103,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested "status": "ok", "version": "1.16.1", "similarSongs": { + "totalCount": 2, "song": [ { "id": "300000060", diff --git a/content/en/docs/Endpoints/getsimilarsongs2.md b/content/en/docs/Endpoints/getsimilarsongs2.md index cd47e83..8f53166 100644 --- a/content/en/docs/Endpoints/getsimilarsongs2.md +++ b/content/en/docs/Endpoints/getsimilarsongs2.md @@ -1,6 +1,6 @@ --- title: "getSimilarSongs2" -linkTitle: "getSimilarSongs2" +linkTitle: "getSimilarSongs2 [OS]" categories: - Browsing description: > @@ -37,6 +37,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested "serverVersion": "0.1.3 (tag)", "openSubsonic": true "similarSongs2": { + "totalCount": 2, "song": [ { "id": "300000060", diff --git a/content/en/docs/Endpoints/getsongsbygenre.md b/content/en/docs/Endpoints/getsongsbygenre.md index 176063b..7c51cc3 100644 --- a/content/en/docs/Endpoints/getsongsbygenre.md +++ b/content/en/docs/Endpoints/getsongsbygenre.md @@ -1,6 +1,6 @@ --- title: "getSongsByGenre" -linkTitle: "getSongsByGenre" +linkTitle: "getSongsByGenre [OS]" categories: - Lists description: > @@ -31,7 +31,65 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested {{< tabpane persistLang=false >}} {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} -// TODO +{ + "subsonic-response": { + "status": "ok", + "version": "1.16.1", + "type": "ampache", + "serverVersion": "6.6.0", + "songsByGenre": { + "totalCount": 2, + "song": [ + { + "id": "300000054", + "parent": "200000002", + "title": "Red&GreenSmoke", + "isDir": false, + "isVideo": false, + "type": "music", + "albumId": "200000002", + "album": "Colorsmoke EP", + "artistId": "100000002", + "artist": "Synthetic", + "coverArt": "200000002", + "duration": 400, + "bitRate": 62, + "track": 5, + "year": 2007, + "genre": "Electronic", + "size": 3209468, + "discNumber": 1, + "suffix": "mp3", + "contentType": "audio/mpeg", + "path": "/media/music/Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k44khM_64kb.mp3" + }, + { + "id": "300000055", + "parent": "200000002", + "title": "Red&GreenSmoke", + "isDir": false, + "isVideo": false, + "type": "music", + "albumId": "200000002", + "album": "Colorsmoke EP", + "artistId": "100000002", + "artist": "Synthetic", + "coverArt": "200000002", + "duration": 400, + "bitRate": 62, + "track": 5, + "year": 2007, + "genre": "Electronic", + "size": 3209886, + "discNumber": 1, + "suffix": "mp3", + "contentType": "audio/mpeg", + "path": "/media/music/Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k22khS_64kb.mp3" + } + ] + } + } +} {{< /tab >}} {{< tab header="Subsonic" lang="json" >}} // TODO diff --git a/content/en/docs/Endpoints/gettopsongs.md b/content/en/docs/Endpoints/gettopsongs.md index 3695130..82f85fb 100644 --- a/content/en/docs/Endpoints/gettopsongs.md +++ b/content/en/docs/Endpoints/gettopsongs.md @@ -1,6 +1,6 @@ --- title: "getTopSongs" -linkTitle: "getTopSongs" +linkTitle: "getTopSongs [OS]" categories: - Browsing description: > @@ -37,6 +37,7 @@ A [`subsonic-response`](../../responses/subsonic-response) element with a nested "serverVersion": "0.1.3 (tag)", "openSubsonic": true "topSongs": { + "totalCount": 2, "song": [ { "id": "300000060", diff --git a/content/en/docs/Endpoints/search3.md b/content/en/docs/Endpoints/search3.md index 840f4b7..b924a7e 100644 --- a/content/en/docs/Endpoints/search3.md +++ b/content/en/docs/Endpoints/search3.md @@ -51,6 +51,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc "serverVersion": "0.1.3 (tag)", "openSubsonic": true "searchResult3": { + "totalArtistCount": 1, "artist": [ { "id": "37ec820ca7193e17040c98f7da7c4b51", @@ -61,6 +62,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc "artistImageUrl": "https://demo.org/image.jpg" } ], + "totalAlbumCount": 1, "album": [ { "id": "ad0f112b6dcf83de5e9cae85d07f0d35", @@ -78,6 +80,7 @@ A [`subsonic-response`](../../responses/subsonic-response) with a nested [`searc "songCount": 8 } ], + "totalArtistCount": 1, "song": [ { "id": "082f435a363c32c57d5edb6a678a28d4", diff --git a/content/en/docs/Responses/albumList.md b/content/en/docs/Responses/albumList.md index c920abd..83f2798 100644 --- a/content/en/docs/Responses/albumList.md +++ b/content/en/docs/Responses/albumList.md @@ -1,6 +1,6 @@ --- title: "albumList" -linkTitle: "albumList" +linkTitle: "albumList [OS]" description: > Album list. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalCount": 2, "album": [ { "id": "200000021", @@ -87,4 +88,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | -| `album` | Array of [`Child`](../child) | No | | Artist albums| +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | +| `album` | Array of [`Child`](../child) | No | | Artist albums | diff --git a/content/en/docs/Responses/albumList2.md b/content/en/docs/Responses/albumList2.md index f459e83..a5c4024 100644 --- a/content/en/docs/Responses/albumList2.md +++ b/content/en/docs/Responses/albumList2.md @@ -1,6 +1,6 @@ --- title: "albumList2" -linkTitle: "albumList2" +linkTitle: "albumList2 [OS]" description: > Album list. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalCount": 2, "album": [ { "id": "200000021", @@ -83,4 +84,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `album` | Array of [`AlbumID3`](../albumid3) | No | | Artist albums| diff --git a/content/en/docs/Responses/newestPodcasts.md b/content/en/docs/Responses/newestPodcasts.md index 830ef3a..f843f7d 100644 --- a/content/en/docs/Responses/newestPodcasts.md +++ b/content/en/docs/Responses/newestPodcasts.md @@ -1,6 +1,6 @@ --- title: "newestPodcasts" -linkTitle: "newestPodcasts" +linkTitle: "newestPodcasts [OS]" description: > NewestPodcasts. --- @@ -17,3 +17,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | +| `episode` | Array of [`Child`](../child) | No | | Podcast Episode | diff --git a/content/en/docs/Responses/searchResult3.md b/content/en/docs/Responses/searchResult3.md index eed6258..02c887c 100644 --- a/content/en/docs/Responses/searchResult3.md +++ b/content/en/docs/Responses/searchResult3.md @@ -1,6 +1,6 @@ --- title: "searchResult3" -linkTitle: "searchResult3" +linkTitle: "searchResult3 [OS]" description: > search3 result. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalArtistCount": 1, "artist": [ { "id": "37ec820ca7193e17040c98f7da7c4b51", @@ -19,6 +20,7 @@ description: > "artistImageUrl": "https://demo.org/image.jpg" } ], + "totalAlbumCount": 1, "album": [ { "id": "ad0f112b6dcf83de5e9cae85d07f0d35", @@ -36,6 +38,7 @@ description: > "songCount": 8, } ], + "totalSongCount": 1, "song": [ { "id": "082f435a363c32c57d5edb6a678a28d4", @@ -133,6 +136,9 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalArtistCount` | Int | No | **Yes** | Total item count for the request ignoring `artistCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `artist` | Array of [`ArtistID3`](../artistid3) | No | | Matching artists | +| `totalAlbumCount` | Int | No | **Yes** | Total item count for the request ignoring `albumCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `album` | Array of [`AlbumID3`](../albumid3) | No | | Matching albums | +| `totalSongCount` | Int | No | **Yes** | Total item count for the request ignoring `songCount` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `song` | Array of [`Child`](../child) | No | | Matching songs | diff --git a/content/en/docs/Responses/similarSongs.md b/content/en/docs/Responses/similarSongs.md index 15d7998..351dabe 100644 --- a/content/en/docs/Responses/similarSongs.md +++ b/content/en/docs/Responses/similarSongs.md @@ -1,6 +1,6 @@ --- title: "similarSongs" -linkTitle: "similarSongs" +linkTitle: "similarSongs [OS]" description: > SimilarSongs list. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalCount": 2, "song": [ { "id": "300000060", @@ -131,4 +132,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `song` | Array of [`Child`](../child) | No | | List of songs | diff --git a/content/en/docs/Responses/similarSongs2.md b/content/en/docs/Responses/similarSongs2.md index 683dec1..93982dc 100644 --- a/content/en/docs/Responses/similarSongs2.md +++ b/content/en/docs/Responses/similarSongs2.md @@ -1,6 +1,6 @@ --- title: "similarSongs2" -linkTitle: "similarSongs2" +linkTitle: "similarSongs2 [OS]" description: > SimilarSongs2 list. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalCount": 2, "song": [ { "id": "300000060", @@ -131,4 +132,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `song` | Array of [`Child`](../child) | No | | List of songs | diff --git a/content/en/docs/Responses/songsByGenre.md b/content/en/docs/Responses/songsByGenre.md index bbdc6f9..66c1b4b 100644 --- a/content/en/docs/Responses/songsByGenre.md +++ b/content/en/docs/Responses/songsByGenre.md @@ -1,6 +1,6 @@ --- title: "songsByGenre" -linkTitle: "songsByGenre" +linkTitle: "songsByGenre [OS]" description: > songsByGenre. --- @@ -8,7 +8,57 @@ description: > {{< tabpane persistLang=false >}} {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} -// TODO +{ + "totalCount": 2, + "song" : [ + { + "id" : "12", + "parent" : "10", + "isDir" : false, + "title" : "Red&GreenSmoke", + "album" : "Colorsmoke EP", + "artist" : "Synthetic", + "track" : 5, + "year" : 2007, + "genre" : "Electronic", + "coverArt" : "10", + "size" : 3209340, + "contentType" : "audio/mpeg", + "suffix" : "mp3", + "duration" : 400, + "bitRate" : 64, + "path" : "Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k44khM_64kb.mp3", + "playCount" : 0, + "created" : "2022-02-10T23:16:05.491Z", + "albumId" : "1", + "artistId" : "1", + "type" : "music" + }, + { + "id" : "13", + "parent" : "10", + "isDir" : false, + "title" : "Red&GreenSmoke", + "album" : "Colorsmoke EP", + "artist" : "Synthetic", + "track" : 5, + "year" : 2007, + "genre" : "Electronic", + "coverArt" : "10", + "size" : 3209758, + "contentType" : "audio/mpeg", + "suffix" : "mp3", + "duration" : 800, + "bitRate" : 64, + "path" : "Synthetic/Synthetic_-_Colorsmoke_EP-20k217-2007(1)/05-Synthetic_-_RedGreenSmokePM20k22khS_64kb.mp3", + "playCount" : 0, + "created" : "2022-02-10T23:16:05.075Z", + "albumId" : "1", + "artistId" : "1", + "type" : "music" + } + ] +} {{< /tab >}} {{< tab header="Subsonic" lang="json" >}} // TODO @@ -17,3 +67,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | +| `song` | Array of [`Child`](../child) | No | | Genre songs| diff --git a/content/en/docs/Responses/topSongs.md b/content/en/docs/Responses/topSongs.md index bf34145..cab23dd 100644 --- a/content/en/docs/Responses/topSongs.md +++ b/content/en/docs/Responses/topSongs.md @@ -1,6 +1,6 @@ --- title: "topSongs" -linkTitle: "topSongs" +linkTitle: "topSongs [OS]" description: > TopSongs list. --- @@ -9,6 +9,7 @@ description: > {{< tab header="**Example**:" disabled=true />}} {{< tab header="OpenSubsonic" lang="json">}} { + "totalCount": 2, "song": [ { "id": "300000060", @@ -131,4 +132,5 @@ description: > | Field | Type | Req. | OpenS. | Details | | --- | --- | --- | --- | --- | +| `totalCount` | Int | No | **Yes** | Total item count for the request ignoring `size` and `offset` limits. Use `-1` to denote unsupported, unknown or uncounted values. | | `song` | Array of [`Child`](../child) | No | | List of songs |