Sync libraries, artist, album, genre, song, playlist, playlist song

This commit is contained in:
CappielloAntonio 2021-07-26 19:03:51 +02:00
parent 3a91ee68db
commit 304a5f078a
30 changed files with 716 additions and 1699 deletions

View file

@ -30,14 +30,14 @@ public class AlbumSongListClient {
this.albumSongListService = retrofit.create(AlbumSongListService.class);
}
public Call<SubsonicResponse> getAlbumList() {
public Call<SubsonicResponse> getAlbumList(String type, int size, int offset) {
Log.d(TAG, "getAlbumList()");
return albumSongListService.getAlbumList(subsonic.getParams());
return albumSongListService.getAlbumList(subsonic.getParams(), type, size, offset);
}
public Call<SubsonicResponse> getAlbumList2() {
public Call<SubsonicResponse> getAlbumList2(String type, int size, int offset) {
Log.d(TAG, "getAlbumList2()");
return albumSongListService.getAlbumList2(subsonic.getParams());
return albumSongListService.getAlbumList2(subsonic.getParams(), type, size, offset);
}
public Call<SubsonicResponse> getRandomSongs(int size) {
@ -45,9 +45,9 @@ public class AlbumSongListClient {
return albumSongListService.getRandomSongs(subsonic.getParams(), size);
}
public Call<SubsonicResponse> getSongsByGenre(String genre, int count) {
public Call<SubsonicResponse> getSongsByGenre(String genre, int count, int offset) {
Log.d(TAG, "getSongsByGenre()");
return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count);
return albumSongListService.getSongsByGenre(subsonic.getParams(), genre, count, offset);
}
public Call<SubsonicResponse> getNowPlaying() {

View file

@ -6,20 +6,21 @@ import java.util.Map;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
public interface AlbumSongListService {
@GET("getAlbumList?type=random")
Call<SubsonicResponse> getAlbumList(@QueryMap Map<String, String> params);
@GET("getAlbumList")
Call<SubsonicResponse> getAlbumList(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
@GET("getAlbumList2?type=random")
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params);
@GET("getAlbumList2")
Call<SubsonicResponse> getAlbumList2(@QueryMap Map<String, String> params, @Query("type") String type, @Query("size") int size, @Query("offset") int offset);
@GET("getRandomSongs?size={size}")
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, int size);
@GET("getRandomSongs")
Call<SubsonicResponse> getRandomSongs(@QueryMap Map<String, String> params, @Query("size") int size);
@GET("getSongsByGenre?genre={genre}?count={count}")
Call<SubsonicResponse> getSongsByGenre(@QueryMap Map<String, String> params, String genre, int count);
@GET("getSongsByGenre")
Call<SubsonicResponse> getSongsByGenre(@QueryMap Map<String, String> params, @Query("genre") String genre, @Query("count") int count, @Query("offset") int offset);
@GET("getNowPlaying")
Call<SubsonicResponse> getNowPlaying(@QueryMap Map<String, String> params);

View file

@ -6,6 +6,7 @@ import java.util.Map;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
public interface BrowsingService {
@ -15,8 +16,8 @@ public interface BrowsingService {
@GET("getIndexes")
Call<SubsonicResponse> getIndexes(@QueryMap Map<String, String> params);
@GET("getMusicDirectory?id={id}")
Call<SubsonicResponse> getMusicDirectory(@QueryMap Map<String, String> params, String id);
@GET("getMusicDirectory")
Call<SubsonicResponse> getMusicDirectory(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getGenres")
Call<SubsonicResponse> getGenres(@QueryMap Map<String, String> params);
@ -24,39 +25,39 @@ public interface BrowsingService {
@GET("getArtists")
Call<SubsonicResponse> getArtists(@QueryMap Map<String, String> params);
@GET("getArtist?id={id}")
Call<SubsonicResponse> getArtist(@QueryMap Map<String, String> params, String id);
@GET("getArtist")
Call<SubsonicResponse> getArtist(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getAlbum?id={id}")
Call<SubsonicResponse> getAlbum(@QueryMap Map<String, String> params, String id);
@GET("getAlbum")
Call<SubsonicResponse> getAlbum(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getSong?id={id}")
Call<SubsonicResponse> getSong(@QueryMap Map<String, String> params, String id);
@GET("getSong")
Call<SubsonicResponse> getSong(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getVideos")
Call<SubsonicResponse> getVideos(@QueryMap Map<String, String> params);
@GET("getVideoInfo?id={id}")
Call<SubsonicResponse> getVideoInfo(@QueryMap Map<String, String> params, String id);
@GET("getVideoInfo")
Call<SubsonicResponse> getVideoInfo(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getArtistInfo?id={id}")
Call<SubsonicResponse> getArtistInfo(@QueryMap Map<String, String> params, String id);
@GET("getArtistInfo")
Call<SubsonicResponse> getArtistInfo(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getArtistInfo2?id={id}")
Call<SubsonicResponse> getArtistInfo2(@QueryMap Map<String, String> params, String id);
@GET("getArtistInfo2")
Call<SubsonicResponse> getArtistInfo2(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getAlbumInfo?id={id}")
Call<SubsonicResponse> getAlbumInfo(@QueryMap Map<String, String> params, String id);
@GET("getAlbumInfo")
Call<SubsonicResponse> getAlbumInfo(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getAlbumInfo2?id={id}")
Call<SubsonicResponse> getAlbumInfo2(@QueryMap Map<String, String> params, String id);
@GET("getAlbumInfo2")
Call<SubsonicResponse> getAlbumInfo2(@QueryMap Map<String, String> params, @Query("id") String id);
@GET("getSimilarSongs?id={id}?count={count}")
Call<SubsonicResponse> getSimilarSongs(@QueryMap Map<String, String> params, String id, int count);
@GET("getSimilarSongs")
Call<SubsonicResponse> getSimilarSongs(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
@GET("getSimilarSongs2?id={id}?count={count}")
Call<SubsonicResponse> getSimilarSongs2(@QueryMap Map<String, String> params, String id, int count);
@GET("getSimilarSongs2")
Call<SubsonicResponse> getSimilarSongs2(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
@GET("getTopSongs?id={id}?count={count}")
Call<SubsonicResponse> getTopSongs(@QueryMap Map<String, String> params, String id, int count);
@GET("getTopSongs")
Call<SubsonicResponse> getTopSongs(@QueryMap Map<String, String> params, @Query("id") String id, @Query("count") int count);
}