Hi All,
Hoping an expert can weigh in here and tell me if i'm doing something wrong..
I am listing all Genres:
Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetGenres", "params": {"properties": ["title"], "limits": { "start" : 0, "end" : 20 }, "sort": { "method" : "label", "order" : "ascending" }}, "id": "AudioLibrary.GetGenres"}
Which results in:
Code:
{"id":"AudioLibrary.GetGenres","jsonrpc":"2.0","result":{"genres":[{"genreid":6,"label":"Alternative","title":"Alternative"},{"genreid":2,"label":"Hip-Hop","title":"Hip-Hop"},{"genreid":5,"label":"Punk","title":"Punk"},{"genreid":4,"label":"Rock","title":"Rock"},{"genreid":3,"label":"Unknown","title":"Unknown"}],"limits":{"end":5,"start":0,"total":5}}}
Note that the "Alternative" genre has an ID of 6.
I then request all Albums that fit this genre:
Code:
{"jsonrpc": "2.0", "method": "AudioLibrary.GetAlbums", "params": {"genreid": 6,"properties": ["artist","artistid","albumlabel","year","thumbnail","genre"], "limits": { "start" : 0, "end" : 20 }, "sort": { "method" : "label", "order" : "ascending" }}, "id": "AudioLibrary.GetAlbumsByGenre"}
And get:
Code:
{"id":"AudioLibrary.GetAlbumsByGenre","jsonrpc":"2.0","result":{"albums":[{"albumid":9,"albumlabel":"WEA","artist":"Green Day","artistid":7,"genre":"Punk","label":"Dookie","thumbnail":"special://masterprofile/Thumbnails/Music/d/daca1175.tbn","year":1994},{"albumid":12,"albumlabel":"Reprise","artist":"Green Day","artistid":7,"genre":"Alternative","label":"Warning","thumbnail":"special://masterprofile/Thumbnails/Music/2/29036724.tbn","year":2000}],"limits":{"end":2,"start":0,"total":2}}}
Notice how I get one album of genre "Punk" and one of "Alternative". Why?