Skip to content
Browse files

jsonrpc: use the new sorting implementation for AudioLibrary.GetArtists

  • Loading branch information...
1 parent 97752d3 commit 45ce48175452124c94f846438b8464d517f0b882 @Montellese committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 xbmc/interfaces/json-rpc/AudioLibrary.cpp
View
9 xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -63,8 +63,13 @@ JSONRPC_STATUS CAudioLibrary::GetArtists(const CStdString &method, ITransportLay
if (parameterObject["albumartistsonly"].isBoolean())
albumArtistsOnly = parameterObject["albumartistsonly"].asBoolean();
+ SortDescription sorting;
+ ParseLimits(parameterObject, sorting.limitStart, sorting.limitEnd);
+ if (!ParseSorting(parameterObject, sorting.sortBy, sorting.sortOrder, sorting.sortAttributes))
+ return InvalidParams;
+
CFileItemList items;
- if (!musicdatabase.GetArtistsNav(musicUrl.ToString(), items, albumArtistsOnly, genreID, albumID, songID))
+ if (!musicdatabase.GetArtistsNav(musicUrl.ToString(), items, albumArtistsOnly, genreID, albumID, songID, sorting))
return InternalError;
// Add "artist" to "properties" array by default
@@ -73,7 +78,7 @@ JSONRPC_STATUS CAudioLibrary::GetArtists(const CStdString &method, ITransportLay
param["properties"] = CVariant(CVariant::VariantTypeArray);
param["properties"].append("artist");
- HandleFileItemList("artistid", false, "artists", items, param, result);
+ HandleFileItemList("artistid", false, "artists", items, param, result, false);
return OK;
}

0 comments on commit 45ce481

Please sign in to comment.
Something went wrong with that request. Please try again.