mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
use overloads instead of new methods
This commit is contained in:
parent
efaae35976
commit
1bc93cce0e
3 changed files with 5 additions and 6 deletions
|
|
@ -105,7 +105,7 @@ public class SongRepository {
|
||||||
|
|
||||||
App.getSubsonicClientInstance(false)
|
App.getSubsonicClientInstance(false)
|
||||||
.getAlbumSongListClient()
|
.getAlbumSongListClient()
|
||||||
.getRandomSongs2(number, fromYear, toYear, genre)
|
.getRandomSongs(number, fromYear, toYear, genre)
|
||||||
.enqueue(new Callback<ApiResponse>() {
|
.enqueue(new Callback<ApiResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<ApiResponse> call, @NonNull Response<ApiResponse> response) {
|
public void onResponse(@NonNull Call<ApiResponse> call, @NonNull Response<ApiResponse> response) {
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,9 @@ public class AlbumSongListClient {
|
||||||
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear);
|
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear);
|
||||||
}
|
}
|
||||||
|
|
||||||
// mr subsonic says we're allowed genres now
|
public Call<ApiResponse> getRandomSongs(int size, Integer fromYear, Integer toYear, String genre) {
|
||||||
public Call<ApiResponse> getRandomSongs2(int size, Integer fromYear, Integer toYear, String genre) {
|
Log.d(TAG, "getRandomSongs()");
|
||||||
Log.d(TAG, "getRandomSongs2()");
|
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear, genre);
|
||||||
return albumSongListService.getRandomSongs2(subsonic.getParams(), size, fromYear, toYear, genre);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Call<ApiResponse> getSongsByGenre(String genre, int count, int offset) {
|
public Call<ApiResponse> getSongsByGenre(String genre, int count, int offset) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public interface AlbumSongListService {
|
||||||
Call<ApiResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear);
|
Call<ApiResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear);
|
||||||
|
|
||||||
@GET("getRandomSongs")
|
@GET("getRandomSongs")
|
||||||
Call<ApiResponse> getRandomSongs2(@QueryMap Map<String, String> params, @Query("size") int size, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear, @Query("genre") String genre);
|
Call<ApiResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size, @Query("fromYear") Integer fromYear, @Query("toYear") Integer toYear, @Query("genre") String genre);
|
||||||
|
|
||||||
@GET("getSongsByGenre")
|
@GET("getSongsByGenre")
|
||||||
Call<ApiResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);
|
Call<ApiResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue