Go to the source code of this file.
|
long long | mpd_playlist_get_playlist_id (MpdObj *mi) |
|
long long | mpd_playlist_get_old_playlist_id (MpdObj *mi) |
|
mpd_Song * | mpd_playlist_get_song (MpdObj *mi, int songid) |
|
mpd_Song * | mpd_playlist_get_song_from_pos (MpdObj *mi, int songpos) |
|
MpdData * | mpd_playlist_get_song_from_pos_range (MpdObj *mi, int start, int stop) |
|
mpd_Song * | mpd_playlist_get_current_song (MpdObj *mi) |
|
int | mpd_playlist_clear (MpdObj *mi) |
|
int | mpd_playlist_shuffle (MpdObj *mi) |
|
int | mpd_playlist_move_pos (MpdObj *mi, int old_pos, int new_pos) |
|
int | mpd_playlist_move_id (MpdObj *mi, int old_id, int new_id) |
|
MpdData * | mpd_playlist_get_changes (MpdObj *mi, int old_playlist_id) |
|
MpdData * | mpd_playlist_get_changes_posid (MpdObj *mi, int old_playlist_id) |
|
int | mpd_playlist_get_playlist_length (MpdObj *mi) |
|
int | mpd_playlist_add (MpdObj *mi, const char *path) |
|
int | mpd_playlist_delete_id (MpdObj *mi, int songid) |
|
int | mpd_playlist_delete_pos (MpdObj *mi, int songpos) |
|
int | mpd_playlist_add_get_id (MpdObj *mi, const char *path) |
|
int | mpd_playlist_queue_add (MpdObj *mi, const char *path) |
|
int | mpd_playlist_queue_load (MpdObj *mi, const char *path) |
|
int | mpd_playlist_queue_delete_id (MpdObj *mi, int id) |
|
int | mpd_playlist_queue_delete_pos (MpdObj *mi, int songpos) |
|
int | mpd_playlist_queue_commit (MpdObj *mi) |
|
void | mpd_playlist_search_start (MpdObj *mi, int exact) |
|
MpdData * | mpd_playlist_search_commit (MpdObj *mi) |
|
void | mpd_playlist_search_add_constraint (MpdObj *mi, mpd_TagItems field, const char *value) |
|
int | mpd_playlist_mpd_queue_add (MpdObj *mi, int songid) |
|
int | mpd_playlist_mpd_queue_remove (MpdObj *mi, int songpos) |
|
int | mpd_playlist_load (MpdObj *mi, const char *path) |
|
◆ mpd_playlist_add()
int mpd_playlist_add |
( |
MpdObj * | mi, |
|
|
const char * | path ) |
◆ mpd_playlist_add_get_id()
int mpd_playlist_add_get_id |
( |
MpdObj * | mi, |
|
|
const char * | path ) |
- Parameters
-
mi | a MpdObj |
path | a path to a song |
Add a single path and return the id Only use this to add a single song, if you need to add multiple songs, use the mpd_playlist_queue_add for improved performance
- Returns
- a MpdError or the songid of the added song
◆ mpd_playlist_clear()
int mpd_playlist_clear |
( |
MpdObj * | mi | ) |
|
mpd_playlist_clear
- Parameters
-
Clears the playlist
- Returns
- 0 on success or MpdError on error.
◆ mpd_playlist_delete_id()
int mpd_playlist_delete_id |
( |
MpdObj * | mi, |
|
|
int | songid ) |
- Parameters
-
Deletes a single song by it's id.
- Returns
- a MpdError
◆ mpd_playlist_delete_pos()
int mpd_playlist_delete_pos |
( |
MpdObj * | mi, |
|
|
int | songpos ) |
- Parameters
-
Deletes a single song by it's position.
- Returns
- a MpdError
◆ mpd_playlist_get_changes()
MpdData * mpd_playlist_get_changes |
( |
MpdObj * | mi, |
|
|
int | old_playlist_id ) |
- Parameters
-
mi | a MpdObj |
old_playlist_id | The id of the old playlist you want to get the changes with. |
Gets a list of songs that changed between the current and the old playlist
- Returns
- a MpdData list
- Examples
- testcase.c.
◆ mpd_playlist_get_changes_posid()
MpdData * mpd_playlist_get_changes_posid |
( |
MpdObj * | mi, |
|
|
int | old_playlist_id ) |
- Parameters
-
mi | a MpdObj |
old_playlist_id | The id of the old playlist you want to get the changes with. |
Gets a list of the song id/pos that changed between the current and the old playlist Check if this command is available.
- Returns
- a MpdData list
◆ mpd_playlist_get_current_song()
- Parameters
-
returns the mpd_Song for the currently playing song
- Returns
- a mpd_Song, this is an internally cached version, and should not be freed. It's also not guaranteed to stay valid (it will be inside the same function if no other mpd_* function gets called.) if you need to keep it around, make a copy.
- Examples
- testcase.c.
◆ mpd_playlist_get_old_playlist_id()
long long mpd_playlist_get_old_playlist_id |
( |
MpdObj * | mi | ) |
|
- Parameters
-
Returns the id of the previous playlist
- Returns
- a long long
◆ mpd_playlist_get_playlist_id()
long long mpd_playlist_get_playlist_id |
( |
MpdObj * | mi | ) |
|
mpd_playlist_get_playlist_id
- Parameters
-
Returns the id of the current playlist
- Returns
- a long long
◆ mpd_playlist_get_playlist_length()
int mpd_playlist_get_playlist_length |
( |
MpdObj * | mi | ) |
|
- Parameters
-
- Returns
- The number of songs in the current playlist.
◆ mpd_playlist_get_song()
- Parameters
-
returns the mpd_Song for playlist entry with songid.
- Returns
- a mpd_Song
◆ mpd_playlist_get_song_from_pos()
mpd_Song * mpd_playlist_get_song_from_pos |
( |
MpdObj * | mi, |
|
|
int | songpos ) |
- Parameters
-
returns the mpd_Song for playlist entry with songpos.
- Returns
- a mpd_Song
◆ mpd_playlist_get_song_from_pos_range()
MpdData * mpd_playlist_get_song_from_pos_range |
( |
MpdObj * | mi, |
|
|
int | start, |
|
|
int | stop ) |
- Parameters
-
mi | a MpdObj |
start | a Songpos |
stop | a Songpos |
returns the MpdData list with song from the playlist from pos start until stop. so start = 0, stop = 5 will return song 0,1,2,3,4,5.
- Returns
- a MdpData
◆ mpd_playlist_load()
int mpd_playlist_load |
( |
MpdObj * | mi, |
|
|
const char * | path ) |
◆ mpd_playlist_move_id()
int mpd_playlist_move_id |
( |
MpdObj * | mi, |
|
|
int | old_id, |
|
|
int | new_id ) |
- Parameters
-
mi | a MpdObj |
old_id | The id of the song to move |
new_id | The id of the song to move too. |
Moves a song in the playlist. This uses the id of the song, not the position
- Returns
- a MpdError
◆ mpd_playlist_move_pos()
int mpd_playlist_move_pos |
( |
MpdObj * | mi, |
|
|
int | old_pos, |
|
|
int | new_pos ) |
- Parameters
-
mi | a MpdObj |
old_pos | The current position in the playlist |
new_pos | The new position in the playlist. |
Moves a song in the playlist. This uses the position of the song, not the id
- Returns
- a MpdError
◆ mpd_playlist_mpd_queue_add()
int mpd_playlist_mpd_queue_add |
( |
MpdObj * | mi, |
|
|
int | songid ) |
- Parameters
-
mi | a MpdObj |
songid | the id of the song to add |
Add the song from the playlist with id songid.
- Returns
- a MpdError
◆ mpd_playlist_mpd_queue_remove()
int mpd_playlist_mpd_queue_remove |
( |
MpdObj * | mi, |
|
|
int | songpos ) |
- Parameters
-
mi | a MpdObj |
songpos | the pos of the song to remove |
Removes the song from the queue at position songpos
- Returns
- a MpdError
◆ mpd_playlist_queue_add()
int mpd_playlist_queue_add |
( |
MpdObj * | mi, |
|
|
const char * | path ) |
◆ mpd_playlist_queue_commit()
int mpd_playlist_queue_commit |
( |
MpdObj * | mi | ) |
|
- Parameters
-
Commits the queue'd commands in a command list. This is an efficient way of doing a lot of adds/removes.
- Returns
- a MpdError
◆ mpd_playlist_queue_delete_id()
int mpd_playlist_queue_delete_id |
( |
MpdObj * | mi, |
|
|
int | id ) |
- Parameters
-
mi | a MpdObj |
id | The songid of the song you want to delete |
This queues a delete song from playlist command. The actually delete isn't done until mpd_playlist_queue_commit is called
- Returns
- a MpdError
◆ mpd_playlist_queue_delete_pos()
int mpd_playlist_queue_delete_pos |
( |
MpdObj * | mi, |
|
|
int | songpos ) |
- Parameters
-
Queues the deletion of a single song by it's position.
- Returns
- a MpdError
◆ mpd_playlist_queue_load()
int mpd_playlist_queue_load |
( |
MpdObj * | mi, |
|
|
const char * | path ) |
◆ mpd_playlist_search_add_constraint()
void mpd_playlist_search_add_constraint |
( |
MpdObj * | mi, |
|
|
mpd_TagItems | field, |
|
|
const char * | value ) |
- Parameters
-
Adds a constraint to the playlist search.
◆ mpd_playlist_search_commit()
◆ mpd_playlist_search_start()
void mpd_playlist_search_start |
( |
MpdObj * | mi, |
|
|
int | exact ) |
◆ mpd_playlist_shuffle()
int mpd_playlist_shuffle |
( |
MpdObj * | mi | ) |
|
- Parameters
-
Shuffles the order of the playlist, this is different than playing random
- Returns
- 0 on success or MpdError on error.