|
myMPD
Internal API documentation
|
Smart playlist generation. More...
#include "compile_time.h"#include "src/mympd_worker/smartpls.h"#include "src/lib/datetime.h"#include "src/lib/filehandler.h"#include "src/lib/json/json_query.h"#include "src/lib/log.h"#include "src/lib/sds_extras.h"#include "src/lib/smartpls.h"#include "src/lib/utility.h"#include "src/lib/validate.h"#include "src/mympd_client/errorhandler.h"#include "src/mympd_client/playlists.h"#include "src/mympd_client/search.h"#include "src/mympd_client/shortcuts.h"#include "src/mympd_client/stickerdb.h"#include "src/mympd_client/tags.h"#include <dirent.h>#include <errno.h>#include <inttypes.h>#include <limits.h>#include <string.h>
Functions | |
| static bool | mympd_worker_smartpls_per_tag (struct t_mympd_worker_state *mympd_worker_state) |
| static bool | mympd_worker_smartpls_delete (struct t_mympd_worker_state *mympd_worker_state, const char *playlist) |
| static bool | mympd_worker_smartpls_update_search (struct t_mympd_worker_state *mympd_worker_state, const char *playlist, const char *expression, const char *sort, bool sortdesc, unsigned max_entries) |
| static bool | mympd_worker_smartpls_update_sticker (struct t_mympd_worker_state *mympd_worker_state, const char *playlist, const char *sticker, const char *value, const char *op, const char *sort, bool sort_desc, unsigned max_entries) |
| static bool | mympd_worker_smartpls_update_newest (struct t_mympd_worker_state *mympd_worker_state, const char *playlist, unsigned timerange, const char *sort, bool sortdesc, unsigned max_entries) |
| bool | mympd_worker_smartpls_update_all (struct t_mympd_worker_state *mympd_worker_state, bool force) |
| bool | mympd_worker_smartpls_update (struct t_mympd_worker_state *mympd_worker_state, const char *playlist) |
Smart playlist generation.
|
static |
Deletes playlists if it exists
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| playlist | playlist to update |
|
static |
Private definitions
Private functions Generates smart playlists for tag values, e.g. one smart playlist for each genre
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| bool mympd_worker_smartpls_update | ( | struct t_mympd_worker_state * | mympd_worker_state, |
| const char * | playlist | ||
| ) |
Updates a smart playlist
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| playlist | smart playlist to update |
| bool mympd_worker_smartpls_update_all | ( | struct t_mympd_worker_state * | mympd_worker_state, |
| bool | force | ||
| ) |
Public functions Updates all smart playlists
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| force | true = force update false = only update if needed |
|
static |
Updates a newest song smart playlist
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| playlist | playlist to update |
| timerange | timerange in seconds since last database update |
| sort | sort by tag |
| sortdesc | sort descending? |
| max_entries | max entries to add to the playlist |
|
static |
Updates a search based smart playlist
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| playlist | playlist to update |
| expression | mpd search expression |
| sort | sort by tag |
| sortdesc | sort descending? |
| max_entries | max entries to add to the playlist |
|
static |
Updates a sticker based smart playlist
| mympd_worker_state | pointer to the t_mympd_worker_state struct |
| playlist | playlist to update |
| sticker | sticker evaluate |
| value | sticker value |
| op | compare operator |
| sort | sort by field |
| sort_desc | sort descending? |
| max_entries | max entries to add to the playlist |