REST API Questions
Posted: 04 Aug 2013, 03:33
I'm having trouble reconciling data I get back via the REST API, specifically, the IDs for indexes don't match those for artists, which may make sense, but I see no way to get from one to another. For example, here's an index record:
If I then hit getMusicDirectory with ID 87, I get, as expected:
Requests for music directories IDs 1952 and 1954, I get the album information I expect. However, if I look for Skillet with getArtists, I get this:
I don't see any way to get from one to another, which is only important, I guess, if you want the genre for the artist, etc. While we're on the subject, note that "albumCount" is off. There are 2 songs, and, I guess 26 songs (that seems high, but I haven't counted to see).
Is there a way to get from the index/music directory to the artist record, or should I just deal with the former?
Code: Select all
{
"id": 87,
"name": "Skillet"
},
Code: Select all
{"subsonic-response": {
"status": "ok",
"directory": {
"child": [
{
"id": 1952,
"title": "[2009] Awake (Deluxe)",
"averageRating": 5,
"userRating": 5,
"created": "2013-06-20T14:27:54",
"parent": 87,
"isDir": true,
"artist": "Skillet",
"coverArt": 1952
},
{
"id": 1954,
"title": "[2006] Comatose",
"starred": "2013-07-08T13:43:48",
"created": "2012-09-28T16:05:35",
"parent": 87,
"isDir": true,
"artist": "Skillet"
}
],
"id": 87,
"name": "Skillet"
},
"xmlns": "http://madsonic.org/restapi",
"version": "1.10.1"
}}
Code: Select all
{
"genre": "Christian Rock",
"id": 94,
"name": "Skillet",
"coverArt": "ar-94",
"albumCount": 26
},
Is there a way to get from the index/music directory to the artist record, or should I just deal with the former?