API Docs for: 0.0.1
Show:

Playlist Class

Module: Native

Playlist class

Methods

addTrackAsync

(
  • Track
)

Add track into playlist

Parameters:

addTrackById

(
  • TrackID
)

Add track into playlist

Parameters:

  • TrackID Integer

    Track ID (as is in database, table Songs.ID)

AddTracksAsync

(
  • Tracks
)

Add tracks into playlist

Parameters:

clearTracksAsync

()

Clears this playlist's tracks

commitAsync

()

Commits this playlist

createCopyAsync

() Playlist

Creates copy (clone) of this playlist

Returns:

Playlist:

as promise

deleteAsync

()

Deletes this playlist

getTracklist

() Tracklist

Gets tracks of this playlist

Returns:

Tracklist:

as promise

Example:

var trcklist = Playlist.getTracklist();
trcklist.whenLoaded().then(function () {
// all tracks are loaded here
});

insertTrackAsync

(
  • Track
)

Inserts track into playlist

Parameters:

  • Track Track

    Track to insert

insertTracksAsync

(
  • Tracks
)

Inserts tracks into playlist

Parameters:

moveTrackAsync

(
  • track
  • beforeTrack
)

Removes track from playlist

Parameters:

  • track Track

    Track to move from

  • beforeTrack Track

    Moves before this track

removeSelectedTracksAsync

(
  • Tracks
)

Removes selected tracks from playlist

Parameters:

  • Tracks SongList

    SongList with selected tracks to remove

removeTrackAsync

(
  • Track
)

Removes track from playlist

Parameters:

  • Track Track

    Track to remove

Properties

id

Integer

Gets playlist id

isAutoPlaylist

Boolean

Gets/Sets whether the playlist is auto-playlist

name

String

Gets/Sets title of this playlist.

parentID

Integer

Gets id of parent playlist