]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
channel: implement 'Use EPG Running State'
authorJaroslav Kysela <perex@perex.cz>
Sat, 31 Oct 2015 21:33:02 +0000 (22:33 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 31 Oct 2015 21:33:02 +0000 (22:33 +0100)
src/channels.c
src/channels.h
src/dvr/dvr_db.c

index ef38463f62d1bbbe2588633b9add52878d2347ba..9ffd20bc9330d66010562729a31d720aeef704f9 100644 (file)
@@ -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,
@@ -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;
index 49607d7765e7a08aa1bd1a99c87859efff60ddbc..71f93c9d3e1d34cf154d43b4424c38b8e28a04fe 100644 (file)
@@ -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;
index ac255079f8683128e3d1125567c04cef51f3c23e..f49f12de59992425240d1236b0650ea819a2dc51 100644 (file)
@@ -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;
   }