Search in sources :

Example 1 with GetRandomSongsResponse

use of org.moire.ultrasonic.api.subsonic.response.GetRandomSongsResponse in project ultrasonic by ultrasonic.

the class RESTMusicService method getRandomSongs.

@Override
public MusicDirectory getRandomSongs(int size, Context context, ProgressListener progressListener) throws Exception {
    updateProgressListener(progressListener, R.string.parser_reading);
    Response<GetRandomSongsResponse> response = subsonicAPIClient.getApi().getRandomSongs(size, null, null, null, null).execute();
    checkResponseSuccessful(response);
    MusicDirectory result = new MusicDirectory();
    result.addAll(APIMusicDirectoryConverter.toDomainEntityList(response.body().getSongsList()));
    return result;
}
Also used : MusicDirectory(org.moire.ultrasonic.domain.MusicDirectory) GetRandomSongsResponse(org.moire.ultrasonic.api.subsonic.response.GetRandomSongsResponse)

Aggregations

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