mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23: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
|
|
@ -77,4 +77,42 @@ public class PlaylistRepository {
|
|||
|
||||
return listLivePlaylistSongs;
|
||||
}
|
||||
|
||||
public void addSongToPlaylist(String playlistId, String songId) {
|
||||
App.getSubsonicClientInstance(application, false)
|
||||
.getPlaylistClient()
|
||||
.updatePlaylist(playlistId, null, true, songId, null)
|
||||
.enqueue(new Callback<SubsonicResponse>() {
|
||||
@Override
|
||||
public void onResponse(Call<SubsonicResponse> call, Response<SubsonicResponse> response) {
|
||||
if (response.body().getStatus().getValue().equals(ResponseStatus.OK)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<SubsonicResponse> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void createPlaylist(String name, String songId) {
|
||||
App.getSubsonicClientInstance(application, false)
|
||||
.getPlaylistClient()
|
||||
.createPlaylist(null, name, songId)
|
||||
.enqueue(new Callback<SubsonicResponse>() {
|
||||
@Override
|
||||
public void onResponse(Call<SubsonicResponse> call, Response<SubsonicResponse> response) {
|
||||
if (response.body().getStatus().getValue().equals(ResponseStatus.OK)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<SubsonicResponse> call, Throwable t) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue