use of org.moire.ultrasonic.api.subsonic.response.GetAlbumList2Response in project ultrasonic by ultrasonic.
the class RESTMusicService method getAlbumList2.
@Override
public MusicDirectory getAlbumList2(String type, int size, int offset, Context context, ProgressListener progressListener) throws Exception {
if (type == null) {
throw new IllegalArgumentException("Type is null!");
}
updateProgressListener(progressListener, R.string.parser_reading);
Response<GetAlbumList2Response> response = subsonicAPIClient.getApi().getAlbumList2(AlbumListType.fromName(type), size, offset, null, null, null, null).execute();
checkResponseSuccessful(response);
MusicDirectory result = new MusicDirectory();
result.addAll(APIAlbumConverter.toDomainEntityList(response.body().getAlbumList()));
return result;
}
Aggregations