From 6e6955d282944c5f2e73ab454cfcc374414986c6 Mon Sep 17 00:00:00 2001 From: Thomas Keil Date: Tue, 2 Jan 2007 19:37:57 +0000 Subject: *** empty log message *** --- Makefile | 4 ++-- channels.ecpp | 15 ++++++++++---- schedule.ecpp | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 schedule.ecpp diff --git a/Makefile b/Makefile index b69c1df..ff1194e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.1 2007/01/02 19:18:27 lordjaxom Exp $ +# $Id: Makefile,v 1.2 2007/01/02 19:37:57 thomas Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -58,7 +58,7 @@ LIBS += httpd/libhttpd.a OBJS = $(PLUGIN).o thread.o tntconfig.o setup.o -WEBS = channels.o +WEBS = channels.o schedule.o ### Implicit rules: diff --git a/channels.ecpp b/channels.ecpp index 6458f5b..dd9fef4 100644 --- a/channels.ecpp +++ b/channels.ecpp @@ -1,6 +1,13 @@ <%pre> +#include +#include #include +<%args> +vorname; +nachname; +alter; + ecpp-application testproject @@ -8,14 +15,14 @@ <{ - for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { - if (!channel->GroupSep() && *channel->Name()) { + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep() && *channel->Name()) { }> - <$ channel->Name() $> + <$ channel->Name() $>Programm
<{ } } - + }> diff --git a/schedule.ecpp b/schedule.ecpp new file mode 100644 index 0000000..8295b80 --- /dev/null +++ b/schedule.ecpp @@ -0,0 +1,63 @@ +<%pre> +#include +#include +#include +#include +#include +int channel_number; + +cSchedulesLock schedulesLock; +const cSchedules* schedules = cSchedules::Schedules(schedulesLock); + + + +<%args> +channel; + + + + ecpp-application testproject + + +<{ + +if (channel.empty()) { + channel_number = 1; +} else { + try { + channel_number = boost::lexical_cast(channel); + } catch (boost::bad_lexical_cast const&) { +}> + Channel nicht numerisch! +<{ + } +}> + + Programm für Channel Nummer <$ channel_number $>
+ +<{ + + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep() && (channel->Number() == channel_number)) { + + const cSchedule *Schedule = schedules->GetSchedule(channel); + if (Schedule) { + time_t now = time(NULL) - Setup.EPGLinger * 60; + for (const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->Next(ev)) { +}> + <$ ev->Title() $>
+ +<{ + } + } else { +}> + Kein Schedule für Channel <$ channel->Number() $> +<{ + } + } + } + +} +}> + + -- cgit v1.2.3