mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Added playlist creator and editor
This commit is contained in:
parent
00b85e5bc2
commit
d2092f5239
14 changed files with 589 additions and 1 deletions
|
|
@ -40,6 +40,21 @@ public class PlaylistClient {
|
|||
return playlistService.getPlaylist(subsonic.getParams(), id);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> createPlaylist(String playlistId, String name, String songId) {
|
||||
Log.d(TAG, "createPlaylist()");
|
||||
return playlistService.createPlaylist(subsonic.getParams(), playlistId, name, songId);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> updatePlaylist(String playlistId, String name, boolean isPublic, String songIdToAdd, String songIndexToRemove) {
|
||||
Log.d(TAG, "updatePlaylist()");
|
||||
return playlistService.updatePlaylist(subsonic.getParams(), playlistId, name, isPublic, songIdToAdd, songIndexToRemove);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> deletePlaylist(String id) {
|
||||
Log.d(TAG, "deletePlaylist()");
|
||||
return playlistService.deletePlaylist(subsonic.getParams(), id);
|
||||
}
|
||||
|
||||
private OkHttpClient getOkHttpClient() {
|
||||
return new OkHttpClient.Builder()
|
||||
.addInterceptor(getHttpLoggingInterceptor())
|
||||
|
|
|
|||
|
|
@ -15,4 +15,13 @@ public interface PlaylistService {
|
|||
|
||||
@GET("getPlaylist")
|
||||
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);
|
||||
|
||||
@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);
|
||||
|
||||
@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