![]() |
JSON - Sort Method Query. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: JSON - Sort Method Query. (/showthread.php?tid=351836) |
JSON - Sort Method Query. - Fergus - 2020-02-17 I'm going cross-eyed reading the Wiki and getting nowhere, so wonder if anyone can point me in the right direction. I can issue the following request to return all of my albums, sorted by artist: Code: http://192.168.1.4:8080/jsonrpc?request={"jsonrpc":"2.0","method":"audioLibrary.GetAlbums","params":{"sort":{"order":"ascending","method":"artist","ignorearticle":true},"properties":["artist"]},"id":1} Can anyone put me out of my misery? Many thanks in advance, Fergus. RE: JSON - Sort Method Query. - black_eagle - 2020-02-18 You can't sort by that directly from json. The best you can do is sort the result returned by year. The fields you can use are defined here -> https://github.com/xbmc/xbmc/blob/master/xbmc/interfaces/json-rpc/schema/types.json#L103 RE: JSON - Sort Method Query. - Fergus - 2020-02-18 Thanks for that - much appreciated! |