diff options
| author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-11-19 18:53:09 +0100 |
|---|---|---|
| committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2008-11-19 18:53:09 +0100 |
| commit | a5c871c47c721e1179bee7c4695169dd3344c0c2 (patch) | |
| tree | c99be1c122c7ba57791ff68c512b661125acbcb6 /epg_events.cpp | |
| parent | da560175d35965dbca9856f7192e0da172fa7d32 (diff) | |
| download | vdr-plugin-live-a5c871c47c721e1179bee7c4695169dd3344c0c2.tar.gz vdr-plugin-live-a5c871c47c721e1179bee7c4695169dd3344c0c2.tar.bz2 | |
new setup option to display channels without EPG
Diffstat (limited to 'epg_events.cpp')
| -rw-r--r-- | epg_events.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/epg_events.cpp b/epg_events.cpp index 962fcfc..ac6bcaa 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -197,6 +197,22 @@ namespace vdrlive /* * ------------------------------------------------------------------------- + * EmptyEvent + * ------------------------------------------------------------------------- + */ + + EmptyEvent::EmptyEvent(std::string const &id, tChannelID const &channelID, const char* channelName) : + EpgInfo(id, channelName), + m_channelID(channelID) + { + } + + EmptyEvent::~EmptyEvent() + { + } + + /* + * ------------------------------------------------------------------------- * EpgEvents * ------------------------------------------------------------------------- */ @@ -267,8 +283,16 @@ namespace vdrlive EpgInfoPtr EpgEvents::CreateEpgInfo(cChannel const *chan, cEvent const *event, char const *idOverride) { - string domId(idOverride ? idOverride : EncodeDomId(chan->GetChannelID(), event->EventID())); - return EpgInfoPtr(new EpgEvent(domId, event, chan->Name())); + if (event) + { + string domId(idOverride ? idOverride : EncodeDomId(chan->GetChannelID(), event->EventID())); + return EpgInfoPtr(new EpgEvent(domId, event, chan->Name())); + } + else if (LiveSetup().GetShowChannelsWithoutEPG()) + { + string domId(idOverride ? idOverride : EncodeDomId(chan->GetChannelID(), 0)); + return EpgInfoPtr(new EmptyEvent(domId, chan->GetChannelID(), chan->Name())); + } } EpgInfoPtr EpgEvents::CreateEpgInfo(string const &recid, cRecording const *recording, char const *caption) |
