Albumart functions.
More...
|
| static bool | handle_coverextract (struct mg_connection *nc, sds cachedir, const char *uri, const char *media_file, bool covercache, int offset) |
| |
| void | webserver_send_albumart_redirect (struct mg_connection *nc, sds data) |
| |
| void | webserver_send_albumart (struct mg_connection *nc, sds data, sds binary) |
| |
| void | request_handler_albumart_by_album_id (struct mg_http_message *hm, unsigned long conn_id, enum albumart_sizes size) |
| |
| bool | request_handler_albumart_by_uri (struct mg_connection *nc, struct mg_http_message *hm, struct t_mg_user_data *mg_user_data, unsigned long conn_id, enum albumart_sizes size) |
| |
◆ handle_coverextract()
| static bool handle_coverextract |
( |
struct mg_connection * |
nc, |
|
|
sds |
cachedir, |
|
|
const char * |
uri, |
|
|
const char * |
media_file, |
|
|
bool |
covercache, |
|
|
int |
offset |
|
) |
| |
|
static |
Privat definitions
Extracts albumart from media files
- Parameters
-
| nc | mongoose connection |
| cachedir | covercache directory |
| uri | song uri |
| media_file | full path to the song |
| covercache | true = covercache is enabled |
| offset | number of embedded image to extract |
- Returns
- true on success, else false
◆ request_handler_albumart_by_album_id()
| void request_handler_albumart_by_album_id |
( |
struct mg_http_message * |
hm, |
|
|
unsigned long |
conn_id, |
|
|
enum albumart_sizes |
size |
|
) |
| |
Request handler for /albumart/albumid, /albumart-thumb/albumid and /albumart-large/albumid. Sends the request to the mympd_api thread.
- Parameters
-
| hm | http message |
| conn_id | connection id |
| size | size of the albumart |
◆ request_handler_albumart_by_uri()
| bool request_handler_albumart_by_uri |
( |
struct mg_connection * |
nc, |
|
|
struct mg_http_message * |
hm, |
|
|
struct t_mg_user_data * |
mg_user_data, |
|
|
unsigned long |
conn_id, |
|
|
enum albumart_sizes |
size |
|
) |
| |
Request handler for /albumart, /albumart-thumb and /albumart-large
- Parameters
-
| nc | mongoose connection |
| hm | http message |
| mg_user_data | pointer to mongoose configuration |
| conn_id | connection id |
| size | albumart size |
- Returns
- true: an image was served, false: request was sent to the mympd_api thread to get the image by MPD
◆ webserver_send_albumart()
| void webserver_send_albumart |
( |
struct mg_connection * |
nc, |
|
|
sds |
data, |
|
|
sds |
binary |
|
) |
| |
Sends the albumart response from mpd to the client
- Parameters
-
| nc | mongoose connection |
| data | jsonrpc response |
| binary | the image |
◆ webserver_send_albumart_redirect()
| void webserver_send_albumart_redirect |
( |
struct mg_connection * |
nc, |
|
|
sds |
data |
|
) |
| |
Public functions Sends the albumart redirect response from the albumart_by_albumid handler
- Parameters
-
| nc | mongoose connection |
| data | jsonrpc response |