Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
service check: text cleanups, add help text, re-enable service when t…
…hey're broadcasted again, fixes #2595
  • Loading branch information
perexg committed Jan 6, 2015
1 parent 1027f29 commit 1afee16
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/html/config_services.html
Expand Up @@ -18,6 +18,12 @@
<dt>Enabled
<dd>Whether or not this service is available for use

<dt>Automatic Checking
<dd>Check for the service presence. If service is no longer broadcasted,
this field will become as "Missing In PAT/SDT". The
check can be also disabled for given service using this
column.

<dt>Channel
<dd>The channel to which the service is mapped

Expand Down
11 changes: 10 additions & 1 deletion src/input/mpegts/dvb_psi.c
Expand Up @@ -1052,6 +1052,10 @@ dvb_pat_callback
tvhdebug("pat", " sid %04X (%d) on pid %04X (%d)", sid, sid, pid, pid);
int save = 0;
if ((s = mpegts_service_find(mm, sid, pid, 1, &save))) {
if (!s->s_enabled && s->s_auto == SERVICE_AUTO_PAT_MISSING) {
tvhinfo("mpegts", "enabling service %s (found in PAT)", s->s_nicename);
s->s_enabled = 1;
}
s->s_dvb_check_seen = dispatch_clock;
mpegts_table_add(mm, DVB_PMT_BASE, DVB_PMT_MASK, dvb_pmt_callback,
NULL, "pmt", MT_CRC | MT_QUICKREQ | MT_SCANSUBS,
Expand Down Expand Up @@ -1588,8 +1592,13 @@ dvb_sdt_callback
s = mpegts_service_find(mm, service_id, 0, 1, &save);
charset = dvb_charset_find(mn, mm, s);

if (s)
if (s) {
if (!s->s_enabled && s->s_auto == SERVICE_AUTO_PAT_MISSING) {
tvhinfo("mpegts", "enabling service %s (found in SDT)", s->s_nicename);
s->s_enabled = 1;
}
s->s_dvb_check_seen = dispatch_clock;
}

/* Descriptor loop */
DVB_DESC_EACH(lptr, llen, dtag, dlen, dptr) {
Expand Down
6 changes: 3 additions & 3 deletions src/service.c
Expand Up @@ -181,9 +181,9 @@ static htsmsg_t *
service_class_auto_list ( void *o )
{
static const struct strtab tab[] = {
{ "", 0 },
{ "No Auto (Disabled)", 1 },
{ "Missing In PAT/SDT", 2 }
{ "Auto Check Enabled", 0 },
{ "Auto Check Disabled", 1 },
{ "Missing In PAT/SDT", 2 }
};
return strtab2htsmsg(tab);
}
Expand Down

0 comments on commit 1afee16

Please sign in to comment.