Implemented songs division by decades

This commit is contained in:
CappielloAntonio 2021-08-04 11:12:21 +02:00
parent bc51b0c9ca
commit 491fa4de3e
11 changed files with 112 additions and 54 deletions

View file

@ -35,14 +35,14 @@ public class AlbumSongListClient {
return albumSongListService.getAlbumList(subsonic.getParams(), type, size, offset);
}
public Call<SubsonicResponse> getAlbumList2(String type, int size, int offset) {
public Call<SubsonicResponse> getAlbumList2(String type, int size, int offset, Integer fromYear, Integer toYear) {
Log.d(TAG, "getAlbumList2()");
return albumSongListService.getAlbumList2(subsonic.getParams(), type, size, offset);
return albumSongListService.getAlbumList2(subsonic.getParams(), type, size, offset, fromYear, toYear);
}
public Call<SubsonicResponse> getRandomSongs(int size) {
public Call<SubsonicResponse> getRandomSongs(int size, Integer fromYear, Integer toYear) {
Log.d(TAG, "getRandomSongs()");
return albumSongListService.getRandomSongs(subsonic.getParams(), size);
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear);
}
public Call<SubsonicResponse> getSongsByGenre(String genre, int count, int offset) {

View file

@ -14,10 +14,10 @@ public interface AlbumSongListService {
Call<SubsonicResponse> getAlbumList(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
@GET("getAlbumList2")
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear);
@GET("getRandomSongs")
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size);
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear);
@GET("getSongsByGenre")
Call<SubsonicResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);