channel: handle better ch_enable in EPG and DVR, fixes #2668
This commit is contained in:
parent
9fc758f946
commit
2ebbd5f42a
4 changed files with 20 additions and 6 deletions
|
@ -122,9 +122,13 @@ autorec_cmp(dvr_autorec_entry_t *dae, epg_broadcast_t *e)
|
|||
if ((cfg = dae->dae_config) == NULL)
|
||||
return 0;
|
||||
if (cfg->dvr_sl_quality_lock)
|
||||
if(dae->dae_channel != NULL &&
|
||||
dae->dae_channel != e->channel)
|
||||
return 0;
|
||||
if(dae->dae_channel != NULL) {
|
||||
if (dae->dae_channel != e->channel &&
|
||||
dae->dae_channel->ch_enabled)
|
||||
return 0;
|
||||
if (!dae->dae_channel->ch_enabled)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(dae->dae_channel_tag != NULL) {
|
||||
LIST_FOREACH(ctm, &dae->dae_channel_tag->ct_ctms, ctm_tag_link)
|
||||
|
|
|
@ -313,7 +313,7 @@ dvr_entry_set_timer(dvr_entry_t *de)
|
|||
|
||||
gtimer_arm_abs(&de->de_timer, dvr_timer_stop_recording, de, stop);
|
||||
|
||||
} else if (de->de_channel) {
|
||||
} else if (de->de_channel && de->de_channel->ch_enabled) {
|
||||
|
||||
de->de_sched_state = DVR_SCHEDULED;
|
||||
|
||||
|
@ -1015,6 +1015,11 @@ dvr_timer_start_recording(void *aux)
|
|||
{
|
||||
dvr_entry_t *de = aux;
|
||||
|
||||
if (de->de_channel == NULL || !de->de_channel->ch_enabled) {
|
||||
de->de_sched_state = DVR_NOSTATE;
|
||||
return;
|
||||
}
|
||||
|
||||
de->de_sched_state = DVR_RECORDING;
|
||||
de->de_rec_state = DVR_RS_PENDING;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ SKEL_DECLARE(epggrab_channel_skel, epggrab_channel_t);
|
|||
/* Check if channels match */
|
||||
int epggrab_channel_match ( epggrab_channel_t *ec, channel_t *ch )
|
||||
{
|
||||
if (!ec || !ch || !ch->ch_epgauto) return 0;
|
||||
if (!ec || !ch || !ch->ch_epgauto || !ch->ch_enabled) return 0;
|
||||
if (LIST_FIRST(&ec->channels)) return 0; // ignore already paired
|
||||
|
||||
if (ec->name && !strcmp(ec->name, channel_get_name(ch))) return 1;
|
||||
|
@ -62,7 +62,7 @@ epggrab_channel_link ( epggrab_channel_t *ec, channel_t *ch )
|
|||
epggrab_channel_link_t *ecl;
|
||||
|
||||
/* No change */
|
||||
if (!ch) return 0;
|
||||
if (!ch || !ch->ch_enabled) return 0;
|
||||
|
||||
/* Already linked */
|
||||
LIST_FOREACH(ecl, &ec->channels, ecl_epg_link) {
|
||||
|
|
|
@ -254,6 +254,7 @@ stream_init(elementary_stream_t *st)
|
|||
{
|
||||
st->es_cc = -1;
|
||||
|
||||
st->es_parser_state = 0;
|
||||
st->es_startcond = 0xffffffff;
|
||||
st->es_curdts = PTS_UNSET;
|
||||
st->es_curpts = PTS_UNSET;
|
||||
|
@ -700,6 +701,10 @@ service_find_instance
|
|||
si->si_mark = 1;
|
||||
|
||||
if (ch) {
|
||||
if (!ch->ch_enabled) {
|
||||
*error = SM_CODE_SVC_NOT_ENABLED;
|
||||
return NULL;
|
||||
}
|
||||
LIST_FOREACH(csm, &ch->ch_services, csm_chn_link) {
|
||||
s = csm->csm_svc;
|
||||
if (s->s_is_enabled(s, flags))
|
||||
|
|
Loading…
Add table
Reference in a new issue