]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI status / subscriptions - add active profile column, fixes #3349
authorJaroslav Kysela <perex@perex.cz>
Fri, 27 Nov 2015 17:03:19 +0000 (18:03 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 27 Nov 2015 17:03:19 +0000 (18:03 +0100)
src/profile.c
src/subscriptions.c
src/webui/static/app/status.js

index d7196a5d64c9df6eb82db72adbe40b251b9fd78e..7a0aa7fb923bb192bd6855bb3a2d499b1133cbce 100644 (file)
@@ -165,11 +165,10 @@ static const char *
 profile_class_get_title ( idnode_t *in, const char *lang )
 {
   profile_t *pro = (profile_t *)in;
-  static char buf[32];
   if (pro->pro_name && pro->pro_name[0])
     return pro->pro_name;
-  snprintf(buf, sizeof(buf), "%s", idclass_get_caption(in->in_class, lang));
-  return buf;
+  snprintf(prop_sbuf, sizeof(prop_sbuf), "%s", idclass_get_caption(in->in_class, lang));
+  return prop_sbuf;
 }
 
 static void
index 10f8fa97823f5036a6d384d3b6ef598b64c82133..65fbdec4fdb4c822bc054b63e9d970ce15353233 100644 (file)
@@ -870,6 +870,7 @@ subscription_create_msg(th_subscription_t *s, const char *lang)
 {
   htsmsg_t *m = htsmsg_create_map();
   descramble_info_t *di;
+  profile_t *pro;
   char buf[256];
 
   htsmsg_add_u32(m, "id", s->ths_id);
@@ -922,6 +923,12 @@ subscription_create_msg(th_subscription_t *s, const char *lang)
       htsmsg_add_str(m, "descramble", buf);
     }
 
+    if (s->ths_prch != NULL) {
+      pro = s->ths_prch->prch_pro;
+      if (pro)
+        htsmsg_add_str(m, "profile", idnode_get_title(&pro->pro_id, lang));
+    }
+
   } else if(s->ths_dvrfile != NULL)
     htsmsg_add_str(m, "service", s->ths_dvrfile ?: "");
 
index 06d750cc40afcc65ac152b196660101cf71b362f..930a3821ea9396e02c870d4b238b47801a1e5d3e 100644 (file)
@@ -21,6 +21,7 @@ tvheadend.status_subs = function(panel, index)
             r.data.service = m.service;
             r.data.state = m.state;
             if (m.descramble) r.data.descramble = m.descramble;
+            if (m.profile) r.data.profile = m.profile;
             r.data.errors = m.errors;
             r.data['in'] = m['in'];
             r.data.out = m.out;
@@ -44,6 +45,7 @@ tvheadend.status_subs = function(panel, index)
                 { name: 'title' },
                 { name: 'channel' },
                 { name: 'service' },
+                { name: 'profile' },
                 { name: 'state' },
                 { name: 'descramble' },
                 { name: 'errors' },
@@ -110,6 +112,12 @@ tvheadend.status_subs = function(panel, index)
                 header: _("Service"),
                 dataIndex: 'service'
             }, 
+            {
+                width: 50,
+                id: 'profile',
+                header: _("Profile"),
+                dataIndex: 'profile'
+            }, 
             {
                 width: 50,
                 id: 'start',