Playlist

class deezer.Playlist(client, json)

To work with Deezer playlist objects.

Check the Deezer documentation for more details about each field.

id: int
title: str
description: str
duration: int
public: bool
is_loved_track: bool
collaborative: bool
nb_tracks: int
unseen_track_count: int
fans: int
share: str
picture: str
picture_small: str
picture_medium: str
picture_big: str
picture_xl: str
checksum: str
creator: User
tracks: list[Track]
get_tracks(**kwargs)

Get tracks from a playlist.

Returns:

a PaginatedList of Track instances

Return type:

PaginatedList[Track]

get_fans(**kwargs)

Get fans from a playlist.

Returns:

a PaginatedList of User instances

Return type:

PaginatedList[User]

add_tracks(tracks, **kwargs)

Add tracks to a playlist.

Parameters:

tracks (list) – A list of the track’s or track id’s to add to the playlist

Returns:

a boolean that tells if the operation was successful

Return type:

bool

delete_tracks(tracks, **kwargs)

Delete tracks from a playlist.

Parameters:

tracks (list) – A list of the track’s or track id’s to delete to the playlist

Returns:

a boolean that tells if the operation was successful

Return type:

bool

reorder_tracks(order, **kwargs)

Reorder the tracks of a playlist.

Parameters:

order (list[int]) – A list of the track id’s in the wished order

Returns:

a boolean that tells if the operation was successful

Return type:

bool