getRandomSongs2(): use new subsonic getRandomSongs param 'genre' instead of getSongsByGenre

This commit is contained in:
observer 2025-11-09 15:02:54 +00:00
parent 611b5001be
commit 8ce0a82506
No known key found for this signature in database
GPG key ID: 2DE1FE56348E60D0
2 changed files with 9 additions and 0 deletions

View file

@ -34,6 +34,12 @@ 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> 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> getSongsByGenre(String genre, int count, int offset) { public Call<ApiResponse> getSongsByGenre(String genre, int count, int offset) {
Log.d(TAG, "getSongsByGenre()"); Log.d(TAG, "getSongsByGenre()");
return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count, offset); return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count, offset);

View file

@ -19,6 +19,9 @@ public interface AlbumSongListService {
@GET("getRandomSongs") @GET("getRandomSongs")
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")
Call<ApiResponse> getRandomSongs2(@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);