myMPD last played API
More...
|
| static sds | get_last_played_obj (struct t_partition_state *partition_state, struct t_stickerdb_state *stickerdb, sds buffer, unsigned entity_count, int64_t last_played, const char *uri, struct t_list *expr_list, const struct t_fields *tagcols, bool print_stickers) |
| |
| bool | mympd_api_last_played_add_song (struct t_partition_state *partition_state, unsigned last_played_count) |
| |
| sds | mympd_api_last_played_list (struct t_partition_state *partition_state, struct t_stickerdb_state *stickerdb, sds buffer, unsigned request_id, unsigned offset, unsigned limit, sds expression, const struct t_fields *tagcols) |
| |
◆ get_last_played_obj()
| static sds get_last_played_obj |
( |
struct t_partition_state * |
partition_state, |
|
|
struct t_stickerdb_state * |
stickerdb, |
|
|
sds |
buffer, |
|
|
unsigned |
entity_count, |
|
|
int64_t |
last_played, |
|
|
const char * |
uri, |
|
|
struct t_list * |
expr_list, |
|
|
const struct t_fields * |
tagcols, |
|
|
bool |
print_stickers |
|
) |
| |
|
static |
Private definitions
Private functions Gets the song and searches for searchstr and prints it as json object
- Parameters
-
| partition_state | pointer to partition state |
| stickerdb | pointer to stickerdb state |
| buffer | already allocated buffer to append the result |
| entity_count | position in the list |
| last_played | songs last played time as unix timestamp |
| uri | uri of the song |
| expr_list | list of search expressions |
| tagcols | columns to print |
| print_stickers | Print stickers? |
- Returns
- pointer to buffer
◆ mympd_api_last_played_add_song()
| bool mympd_api_last_played_add_song |
( |
struct t_partition_state * |
partition_state, |
|
|
unsigned |
last_played_count |
|
) |
| |
Public functions Adds the current playing song to the last played list
- Parameters
-
| partition_state | pointer to partition state |
| last_played_count | max songs in last_played list |
- Returns
- true on success, else false
◆ mympd_api_last_played_list()
| sds mympd_api_last_played_list |
( |
struct t_partition_state * |
partition_state, |
|
|
struct t_stickerdb_state * |
stickerdb, |
|
|
sds |
buffer, |
|
|
unsigned |
request_id, |
|
|
unsigned |
offset, |
|
|
unsigned |
limit, |
|
|
sds |
expression, |
|
|
const struct t_fields * |
tagcols |
|
) |
| |
Prints a jsonrpc response with the last played songs
- Parameters
-
| partition_state | pointer to partition state |
| stickerdb | pointer to stickerdb state |
| buffer | already allocated sds string to append the response |
| request_id | jsonrpc request id |
| offset | offset |
| limit | max number of entries to return |
| expression | mpd search expression |
| tagcols | columns to print |
- Returns
- pointer to buffer