Methods
(inner) appendPlaylist(type, uris, plist, callback) → {void}
Appends entries to a playlist
Parameters:
Name | Type | Description |
---|---|---|
type |
string | one of song, stream, dir, search, album, disc, searchdir |
uris |
Array | uris to add |
plist |
string | playlist to append the uri |
callback |
function | response handling callback |
- Source:
Returns:
- Type
- void
(inner) filterPlaylistsSelect(type, elId, searchstr, selectedPlaylist) → {void}
Gets playlists and populates a select
Parameters:
Name | Type | Description |
---|---|---|
type |
number | type of the playlist 0 = all playlists, 1 = static playlists, 2 = smart playlists |
elId |
string | select element id |
searchstr |
string | search string |
selectedPlaylist |
string | current selected playlist |
- Source:
Returns:
- Type
- void
(inner) insertPlaylist(type, uris, plist, to, callback) → {void}
Inserts entries into a playlist
Parameters:
Name | Type | Description |
---|---|---|
type |
string | one of song, stream, dir, search, album, disc, searchdir |
uris |
Array | uris to add |
plist |
string | playlist to insert the uri |
to |
number | position to insert |
callback |
function | response handling callback |
- Source:
Returns:
- Type
- void
(inner) isMPDplaylist(uri) → {boolean}
Checks if the playlist is a stored playlist of mpd
Parameters:
Name | Type | Description |
---|---|---|
uri |
string | playlist uri |
- Source:
Returns:
true = stored playlist, false = playlist in music directory
- Type
- boolean
(inner) playlistDedup(plist, remove) → {void}
Deduplicates the playlist
Parameters:
Name | Type | Description |
---|---|---|
plist |
string | playlist to deduplicate |
remove |
boolean | true = remove invalid entries, false = count number of invalid entries |
- Source:
Returns:
- Type
- void
(inner) playlistValidate(plist, remove) → {void}
Validates the playlist
Parameters:
Name | Type | Description |
---|---|---|
plist |
string | playlist to validate |
remove |
boolean | true = remove invalid entries, false = count number of invalid entries |
- Source:
Returns:
- Type
- void
(inner) playlistValidateDedup(plist, remove) → {void}
Validates and deduplicates the playlist
Parameters:
Name | Type | Description |
---|---|---|
plist |
string | playlist to deduplicate |
remove |
boolean | true = remove invalid entries, false = count number of invalid entries |
- Source:
Returns:
- Type
- void
(inner) playlistValidateDedupCheckError(obj) → {void}
Handler for jsonrpc responses:
- MYMPD_API_PLAYLIST_CONTENT_DEDUP
- MYMPD_API_PLAYLIST_CONTENT_VALIDATE
- MYMPD_API_PLAYLIST_CONTENT_VALIDATE_DEDUP
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
- Source:
Returns:
- Type
- void
(inner) populatePlaylistSelect(obj, playlistSelectId, selectedPlaylist) → {void}
Populates the custom input element mympd-select-search
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
playlistSelectId |
string | select element id |
selectedPlaylist |
string | current selected playlist |
- Source:
Returns:
- Type
- void
(inner) removeFromPlaylistPositions(plist, positions) → {void}
Removes positions from a playlist
Parameters:
Name | Type | Description |
---|---|---|
plist |
string | the playlist |
positions |
Array | Positions to remove |
- Source:
Returns:
- Type
- void
(inner) removeFromPlaylistRange(plist, start, endopt) → {void}
Removes a range from a playlist
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
plist |
string | the playlist | |
start |
number | Start of the range (including) / song pos | |
end |
number |
<optional> |
End playlist position (excluding), use -1 for open end |
- Source:
Returns:
- Type
- void
(inner) replacePlaylist(type, uris, plist, callback) → {void}
Replaces a playlist
Parameters:
Name | Type | Description |
---|---|---|
type |
string | one of song, stream, dir, search, album, disc, searchdir |
uris |
Array | uris to add |
plist |
string | playlist to replace |
callback |
function | response handling callback |
- Source:
Returns:
- Type
- void
(inner) resumePlist(plist, pos, action) → {void}
Resume playlist API implementation.
Load the playlist from last played song and start playing.
Parameters:
Name | Type | Description |
---|---|---|
plist |
string | Playlist to resume |
pos |
number | Position of first song to resume |
action |
string | Action |
- Source:
Returns:
- Type
- void
(inner) showClearPlaylist() → {void}
Clears a playlist and shows a confirmation modal before
- Source:
Returns:
- Type
- void
(inner) showDelPlaylist(plists) → {void}
Deletes playlists and shows a confirmation modal before
Parameters:
Name | Type | Description |
---|---|---|
plists |
Array | playlists to delete |
- Source:
Returns:
- Type
- void