use of org.moire.ultrasonic.api.subsonic.response.GetPlaylistResponse in project ultrasonic by ultrasonic.
the class RESTMusicService method getPlaylist.
@Override
public MusicDirectory getPlaylist(String id, String name, Context context, ProgressListener progressListener) throws Exception {
if (id == null) {
throw new IllegalArgumentException("id param is null!");
}
updateProgressListener(progressListener, R.string.parser_reading);
Response<GetPlaylistResponse> response = subsonicAPIClient.getApi().getPlaylist(id).execute();
checkResponseSuccessful(response);
MusicDirectory playlist = APIPlaylistConverter.toMusicDirectoryDomainEntity(response.body().getPlaylist());
savePlaylist(name, context, playlist);
return playlist;
}
Aggregations