diff --git a/NEWS b/NEWS index c95f951cc..0081f7596 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,7 @@ ver 0.16 (20??/??/??) - jack: renamed option "ports" to "destination_ports" - jack: support more than two audio channels - httpd: bind port when output is enabled + - httpd: added name/genre/website configuration - wildcards allowed in audio_format configuration - consistently lock audio output objects * player: diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c index fa14d1956..6bd095838 100644 --- a/src/output/httpd_client.c +++ b/src/output/httpd_client.c @@ -282,11 +282,12 @@ httpd_client_send_response(struct httpd_client *client) } else { gchar *metadata_header; - metadata_header = icy_server_metadata_header("Add config information here!", /* TODO */ - "Add config information here!", /* TODO */ - "Add config information here!", /* TODO */ - client->httpd->content_type, - client->metaint); + metadata_header = icy_server_metadata_header( + client->httpd->name, + client->httpd->genre, + client->httpd->website, + client->httpd->content_type, + client->metaint); g_strlcpy(buffer, metadata_header, sizeof(buffer)); diff --git a/src/output/httpd_internal.h b/src/output/httpd_internal.h index e77a2fe0f..55843e73f 100644 --- a/src/output/httpd_internal.h +++ b/src/output/httpd_internal.h @@ -98,6 +98,19 @@ struct httpd_output { */ 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 * connected. diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c index 0467a88c5..d61570557 100644 --- a/src/output/httpd_output_plugin.c +++ b/src/output/httpd_output_plugin.c @@ -111,6 +111,12 @@ httpd_output_init(G_GNUC_UNUSED const struct audio_format *audio_format, struct sockaddr_in *sin; /* 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);