PlaylistManager class

Uses the ListenBrainz API to manage user playlists.

This class provides methods to create, read, update, and delete playlists on ListenBrainz, as well as manage playlist items and import/export playlists from connected music services.

Important: Playlist items use 0-based indexing.

Constructors

PlaylistManager(InitParams params, RateLimiter limiter, Client _client)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
limiter RateLimiter
final
params InitParams
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRecordings({int? offset, required Playlist playlist}) Future<bool>
Appends recordings to an existing playlist.
copy(UuidString playlistMbid) Future<bool>
Creates a copy of an existing playlist.
create(Playlist playlist) Future<bool>
From ListenBrainz docs:
delete(UuidString playlistMbid) Future<bool>
Deletes a playlist permanently.
deleteRecording(UuidString playlistMbid, int index, int count) Future<bool>
Deletes one or more recordings from a playlist.
edit(Playlist playlist) Future<bool>
Edits the metadata of an existing playlist.
export(UuidString playlistMbid, ConnectedServices service, bool isPublic) Future<({String externalUrl})>
Exports a playlist to a connected music service.
exportJspf(ConnectedServices service, Playlist playlist, bool isPublic) Future<({String externalUrl})>
Exports a playlist in JSPF format to a connected music service.
get3rdPartyPlaylists(ConnectedServices service) Future<List<ImportedPlaylist>>
Gets playlists from a music service connected to the user account.
getByMbid(UuidString mbid, bool metadata) Future<Playlist>
Fetches a playlist by its MusicBrainz ID (MBID).
getCollaborator(String user) Future<PlaylistApiResponse>
Fetches playlists for which a user is a collaborator.
getCreatedFor(String user) Future<PlaylistApiResponse>
Fetches playlists that have been created for a given user.
getPlaylists(String user, [int? count, int? offset]) Future<PlaylistApiResponse>
Fetches the playlists of a given user, with optional pagination support.
importFrom(ConnectedServices serviceToImport, String playlistIdOnService) Future<({UuidString identifier, Playlist playlist})>
Imports a playlist from a connected music service into ListenBrainz.
moveRecording(UuidString playlistMbid, UuidString recMbid, int from, int to, int count) Future<bool>
Moves one or more recordings within a playlist.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recommendations(String user) Future<PlaylistApiResponse>
Fetches recommended playlists for a given user.
Searches for playlists by name or description.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited