use of org.moire.ultrasonic.api.subsonic.response.GetAlbumListResponse in project ultrasonic by ultrasonic.
the class RESTMusicService method getAlbumList.
@Override
public MusicDirectory getAlbumList(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<GetAlbumListResponse> response = subsonicAPIClient.getApi().getAlbumList(AlbumListType.fromName(type), size, offset, null, null, null, null).execute();
checkResponseSuccessful(response);
List<MusicDirectory.Entry> childList = APIMusicDirectoryConverter.toDomainEntityList(response.body().getAlbumList());
MusicDirectory result = new MusicDirectory();
result.addAll(childList);
return result;
}
Aggregations