summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Keil <tkeil (at) datacrystal (dot) de>2007-01-02 19:37:57 +0000
committerThomas Keil <tkeil (at) datacrystal (dot) de>2007-01-02 19:37:57 +0000
commit6e6955d282944c5f2e73ab454cfcc374414986c6 (patch)
treea5cdc40d12f1d94d5be93cbf5b46574f66f11552
parent48c46dfdd986ad4a7a0692d05992f7882bef6a88 (diff)
downloadvdr-plugin-live-6e6955d282944c5f2e73ab454cfcc374414986c6.tar.gz
vdr-plugin-live-6e6955d282944c5f2e73ab454cfcc374414986c6.tar.bz2
*** empty log message ***
-rw-r--r--Makefile4
-rw-r--r--channels.ecpp15
-rw-r--r--schedule.ecpp63
3 files changed, 76 insertions, 6 deletions
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 <boost/lexical_cast.hpp>
+#include <vdr/plugin.h>
#include <vdr/channels.h>
</%pre>
+<%args>
+vorname;
+nachname;
+alter;
+</%args>
<html>
<head>
<title>ecpp-application testproject</title>
@@ -8,14 +15,14 @@
<body>
<{
- 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() $><a href="schedule.html?channel=<$ channel->Number() $>">Programm</a><br/>
<{
}
}
-
+
}>
</body>
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 <boost/lexical_cast.hpp>
+#include <vdr/plugin.h>
+#include <vdr/channels.h>
+#include <vdr/epg.h>
+#include <vdr/config.h>
+int channel_number;
+
+cSchedulesLock schedulesLock;
+const cSchedules* schedules = cSchedules::Schedules(schedulesLock);
+
+
+</%pre>
+<%args>
+channel;
+</%args>
+<html>
+ <head>
+ <title>ecpp-application testproject</title>
+ </head>
+ <body>
+<{
+
+if (channel.empty()) {
+ channel_number = 1;
+} else {
+ try {
+ channel_number = boost::lexical_cast<int>(channel);
+ } catch (boost::bad_lexical_cast const&) {
+}>
+ Channel nicht numerisch!
+<{
+ }
+}>
+
+ Programm für Channel Nummer <$ channel_number $><br/>
+
+<{
+
+ 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() $><br/>
+
+<{
+ }
+ } else {
+}>
+ Kein Schedule für Channel <$ channel->Number() $>
+<{
+ }
+ }
+ }
+
+}
+}>
+ </body>
+</html>