Add "dislike" button
This commit is contained in:
parent
df3b7d3d63
commit
00c1fe1893
@ -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