aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2012-09-03 20:08:54 +0200
committermontellese <montellese@xbmc.org>2012-09-03 20:08:54 +0200
commit9dc4b9960565b19293126c475b37cb3e78999968 (patch)
tree389a3c8e8649cb7ace113432aaeb205ff1386233
parent0e62ff83d2bfd8d6d017685c4545e26ecc273b7c (diff)
jsonrpc: fix "total" value returned by AudioLibrary.GetArtists
-rw-r--r--xbmc/interfaces/json-rpc/AudioLibrary.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/interfaces/json-rpc/AudioLibrary.cpp b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
index 56029e6783..66b1d9f63c 100644
--- a/xbmc/interfaces/json-rpc/AudioLibrary.cpp
+++ b/xbmc/interfaces/json-rpc/AudioLibrary.cpp
@@ -78,7 +78,10 @@ JSONRPC_STATUS CAudioLibrary::GetArtists(const CStdString &method, ITransportLay
param["properties"] = CVariant(CVariant::VariantTypeArray);
param["properties"].append("artist");
- HandleFileItemList("artistid", false, "artists", items, param, result, false);
+ int size = items.Size();
+ if (items.HasProperty("total") && items.GetProperty("total").asInteger() > size)
+ size = (int)items.GetProperty("total").asInteger();
+ HandleFileItemList("artistid", false, "artists", items, param, result, size, false);
return OK;
}