mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
implemented the playlist management logic
This commit is contained in:
parent
d2092f5239
commit
4adde9e951
13 changed files with 448 additions and 27 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue