mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-01 15:03:37 +00:00
Implemented star for tracks, albums and artists
This commit is contained in:
@@ -32,14 +32,14 @@ public class MediaAnnotationClient {
|
||||
this.mediaAnnotationService = retrofit.create(MediaAnnotationService.class);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> star(String id) {
|
||||
public Call<SubsonicResponse> star(String id, String albumId, String artistId) {
|
||||
Log.d(TAG, "star()");
|
||||
return mediaAnnotationService.star(subsonic.getParams(), id);
|
||||
return mediaAnnotationService.star(subsonic.getParams(), id, albumId, artistId);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> unstar(String id) {
|
||||
public Call<SubsonicResponse> unstar(String id, String albumId, String artistId) {
|
||||
Log.d(TAG, "unstar()");
|
||||
return mediaAnnotationService.unstar(subsonic.getParams(), id);
|
||||
return mediaAnnotationService.unstar(subsonic.getParams(), id, albumId, artistId);
|
||||
}
|
||||
|
||||
public Call<SubsonicResponse> setRating(String id, int star) {
|
||||
|
||||
@@ -11,12 +11,12 @@ import retrofit2.http.QueryMap;
|
||||
|
||||
public interface MediaAnnotationService {
|
||||
@GET("star")
|
||||
Call<SubsonicResponse> star(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
Call<SubsonicResponse> star(@QueryMap Map<String, String> params, @Query("id") String id, @Query("albumId") String albumId, @Query("artistId") String artistId);
|
||||
|
||||
@GET("stream")
|
||||
Call<SubsonicResponse> unstar(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
@GET("unstar")
|
||||
Call<SubsonicResponse> unstar(@QueryMap Map<String, String> params, @Query("id") String id, @Query("albumId") String albumId, @Query("artistId") String artistId);
|
||||
|
||||
@GET("stream")
|
||||
@GET("setRating")
|
||||
Call<SubsonicResponse> setRating(@QueryMap Map<String, String> params, @Query("id") String id, @Query("star") int star);
|
||||
|
||||
@GET("scrobble")
|
||||
|
||||
Reference in New Issue
Block a user