Smart playlist implementation.
More...
#include "dist/sds/sds.h"
#include <stdbool.h>
Go to the source code of this file.
|
| bool | smartpls_save_sticker (sds workdir, const char *playlist, const char *sticker, const char *value, const char *op, const char *sort, bool sortdesc, int max_entries) |
| |
| bool | smartpls_save_newest (sds workdir, const char *playlist, unsigned timerange, const char *sort, bool sortdesc, int max_entries) |
| |
| bool | smartpls_save_search (sds workdir, const char *playlist, const char *expression, const char *sort, bool sortdesc, int max_entries) |
| |
| bool | smartpls_update (const char *playlist, unsigned long conn_id, unsigned int request_id) |
| |
| bool | smartpls_update_all (bool force) |
| |
| bool | is_smartpls (sds workdir, const char *playlist) |
| |
| time_t | smartpls_get_mtime (sds workdir, const char *playlist) |
| |
Smart playlist implementation.
◆ is_smartpls()
| bool is_smartpls |
( |
sds |
workdir, |
|
|
const char * |
playlist |
|
) |
| |
Checks if playlist is a smart playlist
- Parameters
-
| workdir | myMPD working directory |
| playlist | name of the playlist to check |
- Returns
- true if it is a smart playlist else false
◆ smartpls_get_mtime()
| time_t smartpls_get_mtime |
( |
sds |
workdir, |
|
|
const char * |
playlist |
|
) |
| |
Returns the smart playlist last modification time
- Parameters
-
| workdir | myMPD working directory |
| playlist | name of the playlist to check |
- Returns
- last modification time
◆ smartpls_save_newest()
| bool smartpls_save_newest |
( |
sds |
workdir, |
|
|
const char * |
playlist, |
|
|
unsigned |
timerange, |
|
|
const char * |
sort, |
|
|
bool |
sortdesc, |
|
|
int |
max_entries |
|
) |
| |
Saves a newest smart playlist
- Parameters
-
| workdir | myMPD working directory |
| playlist | playlist name |
| timerange | number of second since now |
| sort | tag to sort the playlist: empty = no sorting, shuffle or mpd tag |
| sortdesc | sort descending? |
| max_entries | maximum number of playlist entries |
- Returns
- true on success else false
◆ smartpls_save_search()
| bool smartpls_save_search |
( |
sds |
workdir, |
|
|
const char * |
playlist, |
|
|
const char * |
expression, |
|
|
const char * |
sort, |
|
|
bool |
sortdesc, |
|
|
int |
max_entries |
|
) |
| |
Saves a search based smart playlist
- Parameters
-
| workdir | myMPD working directory |
| playlist | playlist name |
| expression | mpd search expression |
| sort | tag to sort the playlist: empty = no sorting, shuffle or mpd tag |
| sortdesc | sort descending? |
| max_entries | maximum number of playlist entries |
- Returns
- true on success else false
◆ smartpls_save_sticker()
| bool smartpls_save_sticker |
( |
sds |
workdir, |
|
|
const char * |
playlist, |
|
|
const char * |
sticker, |
|
|
const char * |
value, |
|
|
const char * |
op, |
|
|
const char * |
sort, |
|
|
bool |
sortdesc, |
|
|
int |
max_entries |
|
) |
| |
Saves a sticker based smart playlist
- Parameters
-
| workdir | myMPD working directory |
| playlist | playlist name |
| sticker | sticker name |
| value | minimum integer value of sticker |
| op | compare operator |
| sort | tag to sort the playlist: empty = no sorting, shuffle or mpd tag |
| sortdesc | sort descending? |
| max_entries | maximum number of playlist entries |
- Returns
- true on success else false
◆ smartpls_update()
| bool smartpls_update |
( |
const char * |
playlist, |
|
|
unsigned long |
conn_id, |
|
|
unsigned int |
request_id |
|
) |
| |
Sends a request to the mympd_api_queue to update a smart playlist
- Parameters
-
| playlist | smart playlist to update |
| conn_id | mongoose connection id |
| request_id | jsonrpc request id |
- Returns
- true on success else false
◆ smartpls_update_all()
| bool smartpls_update_all |
( |
bool |
force | ) |
|
Sends a request to the mympd_api_queue to update all smart playlists
- Parameters
-
| force | Force smart playlist update? |
- Returns
- true on success else false