summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/epg.c b/epg.c
index 7b2cb0e..79c1176 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.47 2005/12/30 15:41:59 kls Exp $
+ * $Id: epg.c 1.49 2006/01/15 13:58:30 kls Exp $
*/
#include "epg.h"
@@ -247,6 +247,8 @@ void cEvent::Dump(FILE *f, const char *Prefix, bool InfoOnly) const
if (components) {
for (int i = 0; i < components->NumComponents(); i++) {
tComponent *p = components->Component(i);
+ if (!Setup.UseDolbyDigital && p->stream == 0x02 && p->type == 0x05)
+ continue;
fprintf(f, "%sX %s\n", Prefix, *p->ToString());
}
}
@@ -997,3 +999,19 @@ const cSchedule *cSchedules::GetSchedule(tChannelID ChannelID) const
return NULL;
}
+const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMissing) const
+{
+ // This is not very beautiful, but it dramatically speeds up the
+ // "What's on now/next?" menus.
+ static cSchedule DummySchedule(tChannelID::InvalidID);
+ if (!Channel->schedule)
+ Channel->schedule = GetSchedule(Channel->GetChannelID());
+ if (!Channel->schedule)
+ Channel->schedule = &DummySchedule;
+ if (Channel->schedule == &DummySchedule && AddIfMissing) {
+ cSchedule *Schedule = new cSchedule(Channel->GetChannelID());
+ ((cSchedules *)this)->Add(Schedule);
+ Channel->schedule = Schedule;
+ }
+ return Channel->schedule != &DummySchedule? Channel->schedule : NULL;
+}