output/httpd: added name/genre/website configuration
This commit is contained in:
parent
50c0c4b701
commit
c52f469c9c
1
NEWS
1
NEWS
|
@ -55,6 +55,7 @@ ver 0.16 (20??/??/??)
|
||||||
- jack: renamed option "ports" to "destination_ports"
|
- jack: renamed option "ports" to "destination_ports"
|
||||||
- jack: support more than two audio channels
|
- jack: support more than two audio channels
|
||||||
- httpd: bind port when output is enabled
|
- httpd: bind port when output is enabled
|
||||||
|
- httpd: added name/genre/website configuration
|
||||||
- wildcards allowed in audio_format configuration
|
- wildcards allowed in audio_format configuration
|
||||||
- consistently lock audio output objects
|
- consistently lock audio output objects
|
||||||
* player:
|
* player:
|
||||||
|
|
|
@ -282,11 +282,12 @@ httpd_client_send_response(struct httpd_client *client)
|
||||||
} else {
|
} else {
|
||||||
gchar *metadata_header;
|
gchar *metadata_header;
|
||||||
|
|
||||||
metadata_header = icy_server_metadata_header("Add config information here!", /* TODO */
|
metadata_header = icy_server_metadata_header(
|
||||||
"Add config information here!", /* TODO */
|
client->httpd->name,
|
||||||
"Add config information here!", /* TODO */
|
client->httpd->genre,
|
||||||
client->httpd->content_type,
|
client->httpd->website,
|
||||||
client->metaint);
|
client->httpd->content_type,
|
||||||
|
client->metaint);
|
||||||
|
|
||||||
g_strlcpy(buffer, metadata_header, sizeof(buffer));
|
g_strlcpy(buffer, metadata_header, sizeof(buffer));
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,19 @@ struct httpd_output {
|
||||||
*/
|
*/
|
||||||
struct page *metadata;
|
struct page *metadata;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The configured name.
|
||||||
|
*/
|
||||||
|
char const *name;
|
||||||
|
/**
|
||||||
|
* The configured genre.
|
||||||
|
*/
|
||||||
|
char const *genre;
|
||||||
|
/**
|
||||||
|
* The configured website address.
|
||||||
|
*/
|
||||||
|
char const *website;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A linked list containing all clients which are currently
|
* A linked list containing all clients which are currently
|
||||||
* connected.
|
* connected.
|
||||||
|
|
|
@ -111,6 +111,12 @@ httpd_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
|
||||||
struct sockaddr_in *sin;
|
struct sockaddr_in *sin;
|
||||||
|
|
||||||
/* read configuration */
|
/* read configuration */
|
||||||
|
httpd->name =
|
||||||
|
config_get_block_string(param, "name", "Set name in config");
|
||||||
|
httpd->genre =
|
||||||
|
config_get_block_string(param, "genre", "Set genre in config");
|
||||||
|
httpd->website =
|
||||||
|
config_get_block_string(param, "website", "Set website in config");
|
||||||
|
|
||||||
port = config_get_block_unsigned(param, "port", 8000);
|
port = config_get_block_unsigned(param, "port", 8000);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue