Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI status / subscriptions - add active profile column, fixes #3349
  • Loading branch information
perexg committed Nov 27, 2015
1 parent e2d813f commit 1a73f71
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/profile.c
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/subscriptions.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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 ?: "");

Expand Down
8 changes: 8 additions & 0 deletions src/webui/static/app/status.js
Expand Up @@ -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;
Expand All @@ -44,6 +45,7 @@ tvheadend.status_subs = function(panel, index)
{ name: 'title' },
{ name: 'channel' },
{ name: 'service' },
{ name: 'profile' },
{ name: 'state' },
{ name: 'descramble' },
{ name: 'errors' },
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 1a73f71

Please sign in to comment.