|
myMPD
Internal API documentation
|
WebradioDB update functions. More...
#include "compile_time.h"#include "src/mympd_worker/webradiodb.h"#include "dist/mongoose/mongoose.h"#include "dist/rax/rax.h"#include "src/lib/api.h"#include "src/lib/filehandler.h"#include "src/lib/http_client.h"#include "src/lib/json/json_query.h"#include "src/lib/log.h"#include "src/lib/msg_queue.h"#include "src/lib/sds_extras.h"#include "src/lib/webradio.h"
Functions | |
| static bool | parse_webradiodb (sds str, struct t_webradios *webradiodb) |
| static bool | icb_webradio_alternate (const char *path, sds key, sds value, enum json_vtype vtype, validate_callback vcb, void *userdata, struct t_json_parse_error *error) |
| static struct t_webradio_data * | parse_webradiodb_data (sds str) |
| bool | mympd_worker_webradiodb_update (struct t_mympd_worker_state *mympd_worker_state, bool force) |
WebradioDB update functions.
|
static |
Iteration callback function to parse the alternate webradio streams
| path | json path |
| key | not used |
| value | value to parse as mpd tag |
| vtype | mjson value type |
| vcb | not used - we validate directly |
| userdata | void pointer to t_tags struct |
| error | pointer to t_json_parse_error |
| bool mympd_worker_webradiodb_update | ( | struct t_mympd_worker_state * | mympd_worker_state, |
| bool | force | ||
| ) |
Updates the WebradioDB from the cloud
| mympd_worker_state | mpd worker state |
| force | true = force update, false = update only if database is outdated |
|
static |
Parses the downloaded webradios.min.json
| str | string to parse |
| webradiodb | webradios struct to populate |
|
static |
Parses a webradioDB entry
| str | string to parse |