]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
HTSP: show default language settings in the hello message
authorJaroslav Kysela <perex@perex.cz>
Fri, 29 May 2015 16:06:29 +0000 (18:06 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 29 May 2015 16:06:29 +0000 (18:06 +0200)
src/htsp_server.c

index 2a5dea12233c73a5541de1f3ef7bc1bc78fe190f..0886ce235857c66fe491f3d2f683fba18f519467 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "tvheadend.h"
 #include "atomic.h"
+#include "config.h"
 #include "channels.h"
 #include "subscriptions.h"
 #include "tcp.h"
@@ -966,7 +967,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'");
@@ -987,6 +988,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));