mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Implemented star for tracks, albums and artists
This commit is contained in:
parent
6f1046b137
commit
f09d3b774d
14 changed files with 273 additions and 17 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue