aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2012-10-20 18:29:32 -0700
committerowner <owner@DeeDee-Laptop>2012-10-20 18:29:32 -0700
commit571bbe97638206a5c76ae8754292c2e81802e8eb (patch)
tree104d098d39b07f478cf1e58b45529d643cba6e40 /subsonic-android/src
parent79f51fdff7a0f862f9d1aa1e9167c755cfebdf94 (diff)
downloaddsub-571bbe97638206a5c76ae8754292c2e81802e8eb.tar.gz
dsub-571bbe97638206a5c76ae8754292c2e81802e8eb.tar.bz2
dsub-571bbe97638206a5c76ae8754292c2e81802e8eb.zip
updatePlaylist to addToPlaylist
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java4
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/MusicService.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java10
4 files changed, 11 insertions, 7 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java
index 1782e483..af29cf51 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/CachedMusicService.java
@@ -235,8 +235,8 @@ public class CachedMusicService implements MusicService {
}
@Override
- public void updatePlaylist(String id, String name, String comment, List<Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
- musicService.updatePlaylist(id, name, comment, toAdd, context, progressListener);
+ public void addToPlaylist(String id, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
+ musicService.addToPlaylist(id, toAdd, context, progressListener);
}
private void checkSettingsChanged(Context context) {
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java
index a675e2ea..a6e20ca5 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/MusicService.java
@@ -93,5 +93,5 @@ public interface MusicService {
void setStarred(String id, boolean starred, Context context, ProgressListener progressListener) throws Exception;
- void updatePlaylist(String id, String name, String comment, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception;
+ void addToPlaylist(String id, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception;
} \ No newline at end of file
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
index f4a6bcf0..4662b974 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/OfflineMusicService.java
@@ -315,7 +315,7 @@ public class OfflineMusicService extends RESTMusicService {
}
@Override
- public void updatePlaylist(String id, String name, String comment, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
+ public void addToPlaylist(String id, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
throw new OfflineException("Updating playlist not available in offline mode");
}
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
index 92348332..0317a0a2 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -627,9 +627,13 @@ public class RESTMusicService implements MusicService {
}
@Override
- public void updatePlaylist(String id, String name, String comment, List<Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
- List<String> names = Arrays.asList("playListID", "name", "comment");
- List<Object> values = Arrays.<Object>asList(id, name, comment);
+ public void addToPlaylist(String id, List<MusicDirectory.Entry> toAdd, Context context, ProgressListener progressListener) throws Exception {
+ List<String> names = Arrays.asList("playListID");
+ List<Object> values = Arrays.<Object>asList(id);
+ for(MusicDirectory.Entry song: toAdd) {
+ names.add("songIdToAdd");
+ values.add(song.getId());
+ }
checkServerVersion(context, "1.8", "Updating playlists is not supported.");
Reader reader = getReader(context, progressListener, "updatePlaylist", null, names, values);
try {