diff options
Diffstat (limited to 'src/github/daneren2005/dsub/service/RESTMusicService.java')
-rw-r--r-- | src/github/daneren2005/dsub/service/RESTMusicService.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java index 1733009d..ca937bcc 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -1040,7 +1040,25 @@ public class RESTMusicService implements MusicService { Util.close(reader); } } - + + @Override + public MusicDirectory getTopTrackSongs(String artist, int size, Context context, ProgressListener progressListener) throws Exception { + List<String> parameterNames = new ArrayList<String>(); + List<Object> parameterValues = new ArrayList<Object>(); + + parameterNames.add("artist"); + parameterValues.add(artist); + parameterNames.add("size"); + parameterValues.add(size); + + Reader reader = getReader(context, progressListener, "getTopTrackSongs", null, parameterNames, parameterValues); + try { + return new RandomSongsParser(context, getInstance(context)).parse(reader, progressListener); + } finally { + Util.close(reader); + } + } + @Override public List<PodcastChannel> getPodcastChannels(boolean refresh, Context context, ProgressListener progressListener) throws Exception { checkServerVersion(context, "1.6", "Podcasts not supported."); |