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

Jukebox functions. More...

Include dependency graph for jukebox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void jukebox_clear_all (struct t_mympd_state *mympd_state)
 
void jukebox_disable (struct t_partition_state *partition_state)
 
bool jukebox_trigger_script (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, bool add_to_queue)
 
bool jukebox_run (struct t_mympd_state *mympd_state, struct t_partition_state *partition_state, struct t_cache *album_cache)
 
bool jukebox_add_to_queue (struct t_partition_state *partition_state, struct t_cache *album_cache, unsigned add_songs, sds *error)
 

Detailed Description

Jukebox functions.

Function Documentation

◆ jukebox_add_to_queue()

bool jukebox_add_to_queue ( struct t_partition_state partition_state,
struct t_cache album_cache,
unsigned  add_songs,
sds *  error 
)

Adds songs or albums from the jukebox queue to the MPD queue and starts playing.

Parameters
partition_statepointer to myMPD partition state
album_cachepointer to album cache
add_songsnumber of songs to add
errorpointer to allocated sds for error message
Returns
true on success, else false

◆ jukebox_clear_all()

void jukebox_clear_all ( struct t_mympd_state mympd_state)

Public functions Clears the jukebox queue of all partitions.

Parameters
mympd_statepointer to central myMPD state.

◆ jukebox_disable()

void jukebox_disable ( struct t_partition_state partition_state)

Disables the jukebox timer

Parameters
partition_statepointer to partition state

◆ jukebox_run()

bool jukebox_run ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state,
struct t_cache album_cache 
)

The real jukebox function. It determines if a song must be added or not and starts playing.

Parameters
mympd_statePointer to myMPD state
partition_statePointer to myMPD partition state
album_cachePointer to album cache
Returns
true on success, else false

◆ jukebox_trigger_script()

bool jukebox_trigger_script ( struct t_mympd_state mympd_state,
struct t_partition_state partition_state,
bool  add_to_queue 
)

Executes the jukebox script trigger

Parameters
mympd_statePointer to myMPD state
partition_statePointer to myMPD partition state
add_to_queueAdd entries to MPD queue
Returns
true on success, else false