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

Functions to select random songs or albums. More...

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

Go to the source code of this file.

Data Structures

struct  t_random_add_constraints
 

Functions

unsigned random_select_albums (struct t_partition_state *partition_state, struct t_stickerdb_state *stickerdb, struct t_cache *album_cache, unsigned add_albums, struct t_list *queue_list, struct t_list *add_list, struct t_random_add_constraints *constraints)
 
unsigned random_select_songs (struct t_partition_state *partition_state, struct t_stickerdb_state *stickerdb, unsigned add_songs, const char *playlist, struct t_list *queue_list, struct t_list *add_list, struct t_random_add_constraints *constraints)
 

Detailed Description

Functions to select random songs or albums.

Function Documentation

◆ random_select_albums()

unsigned random_select_albums ( struct t_partition_state partition_state,
struct t_stickerdb_state stickerdb,
struct t_cache album_cache,
unsigned  add_albums,
struct t_list queue_list,
struct t_list add_list,
struct t_random_add_constraints constraints 
)

Adds albums to the add_list

Parameters
partition_statepointer to myMPD partition state
stickerdbpointer to stickerdb state
album_cachepointer to album cache
add_albumsnumber of albums expected in add_list
queue_listlist of current songs in mpd queue and last played
add_listlist to add the albums
constraintsconstraints for album selection
Returns
new length of add_list

◆ random_select_songs()

unsigned random_select_songs ( struct t_partition_state partition_state,
struct t_stickerdb_state stickerdb,
unsigned  add_songs,
const char *  playlist,
struct t_list queue_list,
struct t_list add_list,
struct t_random_add_constraints constraints 
)

Adds songs to the add_list

Parameters
partition_statepointer to myMPD partition state
stickerdbpointer to stickerdb state
add_songsnumber of songs expected in add_list
playlistplaylist from which songs are added
queue_listlist of current songs in mpd queue and last played
add_listlist to add the songs
constraintsconstraints for song selection
Returns
new length of add_list