Adds a new playlist to the main app.
The playlist to add
The ID of the added playlist
Adds songs to a playlist.
The request containing the playlist ID and songs
Retrieves the current song being played.
The current song or undefined if no song is playing
Retrieves the current state of the player.
The current player state
Retrieves a preference value based on the provided data.
The preference data containing key and optional default value
The preference value
Retrieves a secure preference value based on the provided data.
The preference data containing key and optional default value
The secure preference value
Retrieves a list of songs based on the provided options.
The options to filter the songs
An array of Song objects
Retrieves the current playback time.
The current playback time in seconds
Retrieves the current volume level.
The current volume level between 0 and 1
Called when the main app requests the list of accounts.
Event name
Callback that returns the list of accounts
Called when the main app requests to perform an account login.
Event name
Callback that handles the login request
Called when the main app provides an OAuth callback code.
Event name
Callback that handles the OAuth code
Called when the main app requests to scrobble a song.
Event name
Callback that handles the scrobble request
Called when a playlist is removed from the database.
Event name
Callback that receives the removed playlist
Called when a playlist is added to the database.
Event name
Callback that receives the added playlist
Called when a song is removed from the database.
Event name
Callback that receives the removed song
Called when a song is added to the database.
Event name
Callback that receives the added song
Called when preferences are changed.
Event name
Callback that receives the changed preference
Called when the player is seeked to a specific time.
Event name
Callback that receives the new playback time
Called when the song is changed.
Event name
Callback that receives the new song
Called when the player state is changed.
Event name
Callback that receives the new player state
Called when the queue is changed.
Event name
Callback that receives the new queue
Called when the volume is changed.
Event name
Callback that receives the new volume
Called when the main app requests the provider scopes.
Event name
Callback that returns the provider scopes
Called when the main app requests the list of playlists.
Event name
Callback that returns the playlists
Called when the main app requests the content of a specific playlist.
Event name
Callback that returns the playlist content
Called when the main app requests a playlist from a URL.
Event name
Callback that returns the playlist and its songs
Called when the main app requests playback details for a song.
Event name
Callback that returns the playback details
Called when the main app performs a search.
Event name
Callback that returns the search results
Called when the main app requests recommendations.
Event name
Callback that returns the recommendations
Called when the main app requests a song from a URL.
Event name
Callback that returns the song
Called when the main app handles a custom request.
Event name
Callback that handles the custom request
Called when the main app requests songs of a specific artist.
Event name
Callback that returns the artist's songs
Called when the main app requests songs of a specific album.
Event name
Callback that returns the album's songs
Called when the main app requests a song from an ID.
Event name
Callback that returns the song
Called when the main app requests the context menu for songs.
Event name
Callback that returns the context menu items
Called when the main app requests the context menu for a playlist.
Event name
Callback that returns the context menu items
Called when the main app performs an action from the context menu.
Event name
Callback that handles the action
Called when the main app requests lyrics for a song.
Event name
Callback that returns the lyrics
Opens an external URL.
The URL to open
Registers an OAuth token with the main app.
The OAuth token to register
Sets a preference value based on the provided data.
The preference data containing key and value
Sets a secure preference value based on the provided data.
The preference data containing key and value
Updates the list of accounts in the main app.
The API exposed to extensions