Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
channel: implement 'Use EPG Running State'
  • Loading branch information
perexg committed Oct 31, 2015
1 parent 496a1b9 commit 798b481
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/channels.c
Expand Up @@ -410,6 +410,13 @@ const idclass_t channel_class = {
.off = offsetof(channel_t, ch_dvr_extra_time_post),
.opts = PO_ADVANCED
},
{
.type = PT_BOOL,
.id = "epg_running",
.name = N_("Use EPG Running State"),
.off = offsetof(channel_t, ch_epg_running),
.opts = PO_ADVANCED
},
{
.type = PT_STR,
.islist = 1,
Expand Down Expand Up @@ -838,6 +845,7 @@ channel_create0
ch->ch_enabled = 1;
ch->ch_autoname = 1;
ch->ch_epgauto = 1;
ch->ch_epg_running = 1;

if (conf) {
ch->ch_load = 1;
Expand Down
1 change: 1 addition & 0 deletions src/channels.h
Expand Up @@ -77,6 +77,7 @@ typedef struct channel
/* DVR */
int ch_dvr_extra_time_pre;
int ch_dvr_extra_time_post;
int ch_epg_running;
struct dvr_entry_list ch_dvrs;
struct dvr_autorec_entry_list ch_autorecs;
struct dvr_timerec_entry_list ch_timerecs;
Expand Down
2 changes: 1 addition & 1 deletion src/dvr/dvr_db.c
Expand Up @@ -1582,7 +1582,7 @@ void dvr_event_running(epg_broadcast_t *e, epg_source_t esrc, int running)
de = dvr_entry_find_by_event(e);
if (de == NULL)
return;
if (!de->de_config->dvr_running) {
if (!de->de_channel->ch_epg_running || !de->de_config->dvr_running) {
de->de_running_start = de->de_running_stop = 0;
return;
}
Expand Down

0 comments on commit 798b481

Please sign in to comment.