use overloads instead of new methods

This commit is contained in:
observer 2025-11-09 22:01:33 +00:00
parent efaae35976
commit 1bc93cce0e
No known key found for this signature in database
GPG key ID: 2DE1FE56348E60D0
3 changed files with 5 additions and 6 deletions

View file

@ -105,7 +105,7 @@ public class SongRepository {
App.getSubsonicClientInstance(false)
.getAlbumSongListClient()
.getRandomSongs2(number, fromYear, toYear, genre)
.getRandomSongs(number, fromYear, toYear, genre)
.enqueue(new Callback<ApiResponse>() {
@Override
public void onResponse(@NonNull Call<ApiResponse> call, @NonNull Response<ApiResponse> response) {

View file

@ -34,10 +34,9 @@ public class AlbumSongListClient {
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear);
}
// mr subsonic says we're allowed genres now
public Call<ApiResponse> getRandomSongs2(int size, Integer fromYear, Integer toYear, String genre) {
Log.d(TAG, "getRandomSongs2()");
return albumSongListService.getRandomSongs2(subsonic.getParams(), size, fromYear, toYear, genre);
public Call<ApiResponse> getRandomSongs(int size, Integer fromYear, Integer toYear, String genre) {
Log.d(TAG, "getRandomSongs()");
return albumSongListService.getRandomSongs(subsonic.getParams(), size, fromYear, toYear, genre);
}
public Call<ApiResponse> getSongsByGenre(String genre, int count, int offset) {

View file

@ -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);
@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")
Call<ApiResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);