From: Jaroslav Kysela Date: Fri, 27 Nov 2015 17:03:19 +0000 (+0100) Subject: WEBUI status / subscriptions - add active profile column, fixes #3349 X-Git-Tag: v4.2.1~1453 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a73f71157fcab0c222b1dd4bfeb2eb704f34365;p=thirdparty%2Ftvheadend.git WEBUI status / subscriptions - add active profile column, fixes #3349 --- diff --git a/src/profile.c b/src/profile.c index d7196a5d6..7a0aa7fb9 100644 --- a/src/profile.c +++ b/src/profile.c @@ -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 diff --git a/src/subscriptions.c b/src/subscriptions.c index 10f8fa978..65fbdec4f 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -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 ?: ""); diff --git a/src/webui/static/app/status.js b/src/webui/static/app/status.js index 06d750cc4..930a3821e 100644 --- a/src/webui/static/app/status.js +++ b/src/webui/static/app/status.js @@ -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',