Merge branch 'feature/dislike' of kilowatt36/freezer into master
This commit is contained in:
commit
39364f037e
@ -199,6 +199,11 @@ class DeezerAPI {
|
||||
await callApi('artist.deleteFavorite', params: {'ART_ID': id});
|
||||
}
|
||||
|
||||
// Mark track as disliked
|
||||
Future dislikeTrack(String id) async {
|
||||
await callApi('favorite_dislike.add', params: {'ID': id, 'TYPE': 'song'});
|
||||
}
|
||||
|
||||
//Add tracks to playlist
|
||||
Future addToPlaylist(String trackId, String playlistId, {int offset = -1}) async {
|
||||
await callApi('playlist.addSongs', params: {
|
||||
|
@ -317,6 +317,15 @@ class _PlayerScreenVerticalState extends State<PlayerScreenVertical> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.sentiment_very_dissatisfied, size: ScreenUtil().setWidth(46)),
|
||||
onPressed: () async {
|
||||
await deezerAPI.dislikeTrack(AudioService.currentMediaItem.id);
|
||||
if (playerHelper.queueIndex < (AudioService.queue??[]).length - 1) {
|
||||
AudioService.skipToNext();
|
||||
}
|
||||
}
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.more_vert, size: ScreenUtil().setWidth(46)),
|
||||
onPressed: () {
|
||||
|
Loading…
Reference in New Issue
Block a user