From: Jaroslav Kysela Date: Fri, 29 May 2015 16:06:29 +0000 (+0200) Subject: HTSP: show default language settings in the hello message X-Git-Tag: v4.0.4~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44700370c4d7f0020e3798b24c7e1e3063f80321;p=thirdparty%2Ftvheadend.git HTSP: show default language settings in the hello message --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 34d536be1..a6b27730b 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -18,6 +18,7 @@ #include "tvheadend.h" #include "atomic.h" +#include "config.h" #include "channels.h" #include "subscriptions.h" #include "tcp.h" @@ -952,7 +953,7 @@ htsp_method_hello(htsp_connection_t *htsp, htsmsg_t *in) { htsmsg_t *r; uint32_t v; - const char *name; + const char *name, *lang; if(htsmsg_get_u32(in, "htspversion", &v)) return htsp_error("Missing argument 'htspversion'"); @@ -973,6 +974,9 @@ htsp_method_hello(htsp_connection_t *htsp, htsmsg_t *in) htsmsg_add_bin(r, "challenge", htsp->htsp_challenge, 32); if (tvheadend_webroot) htsmsg_add_str(r, "webroot", tvheadend_webroot); + lang = config_get_language(); + if (lang) + htsmsg_add_str(r, "language", lang); /* Capabilities */ htsmsg_add_msg(r, "servercapability", tvheadend_capabilities_list(1));