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

Some MPD shortcuts. More...

#include "compile_time.h"
#include "src/mympd_client/shortcuts.h"
#include "src/lib/cache/cache_rax_album.h"
#include "src/lib/log.h"
#include "src/lib/sds_extras.h"
#include "src/mympd_client/errorhandler.h"
#include "src/mympd_client/search.h"
Include dependency graph for shortcuts.c:

Functions

bool mympd_client_command_list_end_check (struct t_partition_state *partition_state)
 
bool mympd_client_add_uris_to_queue (struct t_partition_state *partition_state, struct t_list *uris, unsigned to, unsigned whence, sds *error)
 
bool mympd_client_add_album_to_queue (struct t_partition_state *partition_state, struct t_cache *album_cache, sds album_id, unsigned to, unsigned whence, sds *error)
 
bool mympd_client_add_albums_to_queue (struct t_partition_state *partition_state, struct t_cache *album_cache, struct t_list *albumids, unsigned to, unsigned whence, sds *error)
 

Detailed Description

Some MPD shortcuts.

Function Documentation

◆ mympd_client_add_album_to_queue()

bool mympd_client_add_album_to_queue ( struct t_partition_state partition_state,
struct t_cache album_cache,
sds  album_id,
unsigned  to,
unsigned  whence,
sds *  error 
)

Inserts an album into the queue

Parameters
partition_statepointer to partition state
album_cachepointer to album cache
album_idalbum id to add
toposition to insert
whencehow to interpret the to parameter
errorpointer to an already allocated sds string for the error message
Returns
true on success, else false

◆ mympd_client_add_albums_to_queue()

bool mympd_client_add_albums_to_queue ( struct t_partition_state partition_state,
struct t_cache album_cache,
struct t_list albumids,
unsigned  to,
unsigned  whence,
sds *  error 
)

Inserts albums into the queue

Parameters
partition_statepointer to partition state
album_cachepointer to album cache
albumidsalbum ids to insert
toposition to insert
whencehow to interpret the to parameter
errorpointer to an already allocated sds string for the error message
Returns
true on success, else false

◆ mympd_client_add_uris_to_queue()

bool mympd_client_add_uris_to_queue ( struct t_partition_state partition_state,
struct t_list uris,
unsigned  to,
unsigned  whence,
sds *  error 
)

Insert uris into the queue

Parameters
partition_statepointer to partition state
urisuris to insert
toposition to insert
whencehow to interpret the to parameter
errorpointer to an already allocated sds string for the error message
Returns
true on success, else false

◆ mympd_client_command_list_end_check()

bool mympd_client_command_list_end_check ( struct t_partition_state partition_state)

Sends mpd_command_list_end if MPD is connected. Usage: Set MPD_FAILURE if a send command returns false in a command list. Workaround for not cancelable command lists

Parameters
partition_statepointer to partition state
Returns
true on success, else false