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

Albumart functions. More...

#include "dist/mongoose/mongoose.h"
#include "dist/sds/sds.h"
#include "src/webserver/utility.h"
Include dependency graph for albumart.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  albumart_sizes { ALBUMART_THUMBNAIL , ALBUMART_FULL }
 

Functions

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)
 

Detailed Description

Albumart functions.

Enumeration Type Documentation

◆ albumart_sizes

Albumart types

Function Documentation

◆ 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 and /albumart-thumb/albumid. Sends the request to the mympd_api thread.

Parameters
hmhttp message
conn_idconnection id
sizesize 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 and /albumart-thumb

Parameters
ncmongoose connection
hmhttp message
mg_user_datapointer to mongoose configuration
conn_idconnection id
sizealbumart 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
ncmongoose connection
datajsonrpc response
binarythe 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
ncmongoose connection
datajsonrpc response