Playlist


new Playlist(client, source, playlist_name)

Object that represents a stored playlist

Parameters:
Name Type Description
client MPD

the MPD client object that owns this Songlist

source Object

configuration object that contains a list of songs

playlist_name String

the name of the playlist

Source:

Extends

Methods


getMetadata() → {directory_metadata}

get the MPD reported metadata, raw

Inherited From:
Source:
Returns:

gets the all of the raw metadata MPD provided

Type
directory_metadata

getPath() → {String}

get the path to (including) this directory. relative to the MPD server's media root

Inherited From:
Source:
Returns:

path to this directory. relative to the MPD server's media root

Type
String

getLastModified() → {Date}

when was the directory last altered

Inherited From:
Source:
Returns:

when the song file last altered

Type
Date

clone() → {Directory}

return a copy of this object. the point of this is to return an object that the used cannot use to mutate this one, but that has the exact same behaviour

Inherited From:
Overrides:
Source:
Returns:
Type
Directory

<abstract> addSongByFile(pathname)

given a song filename add it to this Songlist

Parameters:
Name Type Description
pathname String

relative path to the song file in the MPD database

Inherited From:
Source:

<abstract> clear()

remove all songs from this Songlist

Inherited From:
Source:

<abstract> removeSongByPosition(position)

remove a song as identified

Parameters:
Name Type Description
position Integer

position on the list of the song you want to remove

Inherited From:
Source:

<abstract> moveSongByPosition(position, to)

remove a song as identified

Parameters:
Name Type Description
position Integer

position on the list of the song you want to remove

to Integer

position on the list where you want the song to to be

Inherited From:
Source:

<abstract> swapSongsByPosition(position_a, position_b)

swap two songs

Parameters:
Name Type Description
position_a Integer

position on the list of the song you want to move

position_b Integer

position on the list of the other song you want to move

Inherited From:
Source:

getSongs() → {Array.<Song>}

get the list of songs

Inherited From:
Source:
Returns:
Type
Array.<Song>