new PlaylistSong(client, source)
A song that is on a playlist
exactly like a normal song, but is here to let people override
Parameters:
Name | Type | Description |
---|---|---|
client |
MPD | the MPD client object that owns this |
source |
song_metadata | raw metadata javascript object that contains the MPD reported data for this song |
- Source:
Extends
Methods
-
getMetadata() → {song_metadata}
-
get the MPD reported metadata, raw
- Inherited From:
- Source:
Returns:
gets the all of the raw metadata MPD provided
- Type
- song_metadata
-
getDisplayName() → {String}
-
get the best looking name for this song, prefer Title, fallback to something derived from filename
- Inherited From:
- Source:
Returns:
a good looking display name for this sing, suitable for presenting to the user
- Type
- String
-
getPath() → {String}
-
get the filename
- Inherited From:
- Source:
Returns:
the full path to the music file in MPD's music directory. relative path.
- Type
- String
-
getLastModified() → {Date}
-
when was the song file last altered
- Inherited From:
- Source:
Returns:
when the song file last altered
- Type
- Date
-
getDuration() → {Number}
-
get the song's duration
- Inherited From:
- Source:
Returns:
song duration in number of seconds
- Type
- Number
-
getArtist() → {String}
-
get the song's artist
- Inherited From:
- Source:
Returns:
from the song metadata
- Type
- String
-
getTitle() → {String}
-
get the song's title
- Inherited From:
- Source:
Returns:
from the song metadata
- Type
- String
-
getAlbum() → {String}
-
get the song's album
- Inherited From:
- Source:
Returns:
from the song metadata
- Type
- String
-
getTrack() → {String}
-
get the song's track
- Inherited From:
- Source:
Returns:
from the song metadata
- Type
- String
-
getGenre() → {String}
-
get the song's genre
- Inherited From:
- Source:
Returns:
from the song metadata
- Type
- String
-
getDisk() → {String}
-
get the reported disk number from of the song, note this need not be a number or numeric, also need not exsist
- Inherited From:
- Source:
Returns:
reported disk
- Type
- String
-
getQueueSong() → {QueueSong}
-
if this song is on the Queue, get the QueueSong
- Inherited From:
- Source:
Returns:
- Type
- QueueSong
-
clone() → {Song}
-
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:
- Source:
Returns:
- Type
- Song