diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-10-23 18:08:11 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-10-23 18:08:11 -0700 |
commit | 1219296b3df42ea40539051dc24a2e00bd4ef436 (patch) | |
tree | 6da8cddd552fe478ae085de65c3b0b5c46e30753 | |
parent | 85d147265a5f85840f25bb4163f5f9899095ae24 (diff) | |
download | dsub-1219296b3df42ea40539051dc24a2e00bd4ef436.tar.gz dsub-1219296b3df42ea40539051dc24a2e00bd4ef436.tar.bz2 dsub-1219296b3df42ea40539051dc24a2e00bd4ef436.zip |
Added folderId param to getRandomSongs in MusicService
4 files changed, 6 insertions, 6 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java index baab4c5f..798cf8e6 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java @@ -185,8 +185,8 @@ public class CachedMusicService implements MusicService { } @Override - public MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception { - return musicService.getRandomSongs(size, context, progressListener); + public MusicDirectory getRandomSongs(int size, String folder, Context context, ProgressListener progressListener) throws Exception { + return musicService.getRandomSongs(size, folder, context, progressListener); } @Override diff --git a/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java index 5f17c826..1dc247f1 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java @@ -73,7 +73,7 @@ public interface MusicService { MusicDirectory getAlbumList(String type, int size, int offset, Context context, ProgressListener progressListener) throws Exception; - MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception; + MusicDirectory getRandomSongs(int size, String folder, Context context, ProgressListener progressListener) throws Exception; Bitmap getCoverArt(Context context, MusicDirectory.Entry entry, int size, boolean saveToFile, ProgressListener progressListener) throws Exception; diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java index 9b7120ea..e39d9233 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java @@ -330,7 +330,7 @@ public class OfflineMusicService extends RESTMusicService { } @Override - public MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception { + public MusicDirectory getRandomSongs(int size, String folder, Context context, ProgressListener progressListener) throws Exception { File root = FileUtil.getMusicDirectory(context); List<File> children = new LinkedList<File>(); listFilesRecursively(root, children); diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 4fc49a79..fd418438 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -467,11 +467,11 @@ public class RESTMusicService implements MusicService { } @Override - public MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception { + public MusicDirectory getRandomSongs(int size, String folder, Context context, ProgressListener progressListener) throws Exception { HttpParams params = new BasicHttpParams(); HttpConnectionParams.setSoTimeout(params, SOCKET_READ_TIMEOUT_GET_RANDOM_SONGS); - Reader reader = getReader(context, progressListener, "getRandomSongs", params, "size", size); + Reader reader = getReader(context, progressListener, "getRandomSongs", params, Arrays.asList("size", "musicFolderId"), Arrays.<Object>asList(size, folder)); try { return new RandomSongsParser(context).parse(reader, progressListener); } finally { |