myMPD
Internal API documentation
Loading...
Searching...
No Matches
jukebox.c File Reference

myMPD jukebox API More...

Include dependency graph for jukebox.c:

Functions

void mympd_api_jukebox_clear (struct t_list *list, sds partition_name)
 
bool mympd_api_jukebox_rm_entries (struct t_list *list, struct t_list *positions, sds partition_name, sds *error)
 
sds mympd_api_jukebox_length (struct t_partition_state *partition_state, sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id)
 
bool mympd_api_jukebox_append_uris (struct t_partition_state *partition_state, struct t_list *uris)
 
sds mympd_api_jukebox_list (struct t_partition_state *partition_state, struct t_stickerdb_state *stickerdb, struct t_cache *album_cache, sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, unsigned offset, unsigned limit, sds expression, const struct t_fields *tagcols)
 

Detailed Description

myMPD jukebox API

Function Documentation

◆ mympd_api_jukebox_append_uris()

bool mympd_api_jukebox_append_uris ( struct t_partition_state partition_state,
struct t_list uris 
)

Appends songs the the jukebox queue. This is only allowed in jukebox script mode.

Parameters
partition_statepointer to myMPD partition state
urislist of uris to add
Returns
true on success, else false

◆ mympd_api_jukebox_clear()

void mympd_api_jukebox_clear ( struct t_list list,
sds  partition_name 
)

Clears the jukebox queue. This is a simple wrapper around list_clear.

Parameters
partition_namename of the partition
listthe jukebox queue

◆ mympd_api_jukebox_length()

sds mympd_api_jukebox_length ( struct t_partition_state partition_state,
sds  buffer,
enum mympd_cmd_ids  cmd_id,
unsigned  request_id 
)

Returns the length of the jukebox queue

Parameters
partition_statepointer to myMPD partition state
bufferalready allocated sds string to append the result
cmd_idjsonrpc method
request_idjsonrpc request id
Returns
pointer to buffer

◆ mympd_api_jukebox_list()

sds mympd_api_jukebox_list ( struct t_partition_state partition_state,
struct t_stickerdb_state stickerdb,
struct t_cache album_cache,
sds  buffer,
enum mympd_cmd_ids  cmd_id,
unsigned  request_id,
unsigned  offset,
unsigned  limit,
sds  expression,
const struct t_fields tagcols 
)

Prints the jukebox queue as an jsonrpc response

Parameters
partition_statepointer to myMPD partition state
stickerdbpointer to stickerdb state
album_cachePointer to album cache
bufferalready allocated sds string to append the result
cmd_idjsonrpc method
request_idjsonrpc request id
offsetoffset for printing
limitmax entries to print
expressionmpd search expression
tagcolscolumns to print
Returns
pointer to buffer

◆ mympd_api_jukebox_rm_entries()

bool mympd_api_jukebox_rm_entries ( struct t_list list,
struct t_list positions,
sds  partition_name,
sds *  error 
)

Removes entries from the jukebox queue.

Parameters
listthe jukebox queue
positionspositions to remove
partition_namename of the partition
errorpointer to sds string to populate an error string
Returns
true on success, else false