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]

mark_seen(**kwargs)

Mark the playlist as seen.

Returns:

a boolean that tells if the operation was successful

Return type:

bool

add_tracks(tracks, **kwargs)

Add tracks to a playlist.

Parameters:

tracks (Iterable[int | Track]) – An iterable of Track instances or their IDs 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 (Iterable[int | Track]) – An iterable of Track instances or their IDs to remove from 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 (Iterable[int | Track]) – An iterable of Track instances or their IDs in the wished order.

Returns:

a boolean that tells if the operation was successful

Return type:

bool