mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 15:03:37 +00:00
implemented the playlist management logic
This commit is contained in:
@@ -6,6 +6,8 @@ import com.cappielloantonio.play.subsonic.Subsonic;
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
import com.tickaroo.tikxml.retrofit.TikXmlConverterFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.Call;
|
||||
@@ -40,12 +42,12 @@ public class PlaylistClient {
|
||||
return playlistService.getPlaylist(subsonic.getParams(), id);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> createPlaylist(String playlistId, String name, String songId) {
|
||||
public Call<SubsonicResponse> createPlaylist(String playlistId, String name, ArrayList<String> songsId) {
|
||||
Log.d(TAG, "createPlaylist()");
|
||||
return playlistService.createPlaylist(subsonic.getParams(), playlistId, name, songId);
|
||||
return playlistService.createPlaylist(subsonic.getParams(), playlistId, name, songsId);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> updatePlaylist(String playlistId, String name, boolean isPublic, String songIdToAdd, String songIndexToRemove) {
|
||||
public Call<SubsonicResponse> updatePlaylist(String playlistId, String name, boolean isPublic, ArrayList<String> songIdToAdd, ArrayList<Integer> songIndexToRemove) {
|
||||
Log.d(TAG, "updatePlaylist()");
|
||||
return playlistService.updatePlaylist(subsonic.getParams(), playlistId, name, isPublic, songIdToAdd, songIndexToRemove);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cappielloantonio.play.subsonic.api.playlist;
|
||||
|
||||
import com.cappielloantonio.play.subsonic.models.SubsonicResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import retrofit2.Call;
|
||||
@@ -17,10 +18,10 @@ public interface PlaylistService {
|
||||
Call<SubsonicResponse> getPlaylist(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@GET("createPlaylist")
|
||||
Call<SubsonicResponse> createPlaylist(@QueryMap Map<String, String> params, @Query("playlistId") String playlistId, @Query("name") String name, @Query("songId") String songId);
|
||||
Call<SubsonicResponse> createPlaylist(@QueryMap Map<String, String> params, @Query("playlistId") String playlistId, @Query("name") String name, @Query("songId") ArrayList<String> songsId);
|
||||
|
||||
@GET("updatePlaylist")
|
||||
Call<SubsonicResponse> updatePlaylist(@QueryMap Map<String, String> params, @Query("playlistId") String playlistId, @Query("name") String name, @Query("public") boolean isPublic, @Query("songIdToAdd") String songIdToAdd, @Query("songIndexToRemove") String songIndexToRemove);
|
||||
Call<SubsonicResponse> updatePlaylist(@QueryMap Map<String, String> params, @Query("playlistId") String playlistId, @Query("name") String name, @Query("public") boolean isPublic, @Query("songIdToAdd") ArrayList<String> songIdToAdd, @Query("songIndexToRemove") ArrayList<Integer> songIndexToRemove);
|
||||
|
||||
@GET("deletePlaylist")
|
||||
Call<SubsonicResponse> deletePlaylist(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
Reference in New Issue
Block a user