Search in sources :

Example 1 with GetAlbumList2Response

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;
}
Also used : MusicDirectory(org.moire.ultrasonic.domain.MusicDirectory) GetAlbumList2Response(org.moire.ultrasonic.api.subsonic.response.GetAlbumList2Response)

Aggregations

GetAlbumList2Response (org.moire.ultrasonic.api.subsonic.response.GetAlbumList2Response)1 MusicDirectory (org.moire.ultrasonic.domain.MusicDirectory)1