summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog6
-rw-r--r--pages/schedule.ecpp15
2 files changed, 17 insertions, 4 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 2576af5..13bb80a 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-13 Dieter Hametner <dh+vdr at gekrumbel dot de>
+
+ * pages/schedule.ecpp: If no channel is given, and a current
+ channel is know to vdr select it when calling the schedule page
+ in live.
+
2007-06-12 Dieter Hametner <dh+vdr at gekrumbel dot de>
Added orange-blue theme as an example of a theme with dark
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index b2faf89..ef03fdf 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -3,6 +3,7 @@
#include <vdr/channels.h>
#include <vdr/epg.h>
#include <vdr/config.h>
+#include <vdr/device.h>
#include "exception.h"
#include "livefeatures.h"
#include "setup.h"
@@ -37,11 +38,17 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
throw HtmlError( tr("Couldn't aquire access to channels, please try again later.") );
// cChannel* Channel; (see %request above)
- if ( channel > 0 )
+ if ( channel > 0 ) {
Channel = Channels.GetByNumber( channel );
- else
- Channel = Channels.Get( Channels.GetNextNormal( -1 ) );
-
+ }
+ else {
+ if (cDevice::CurrentChannel()) {
+ Channel = Channels.GetByNumber(cDevice::CurrentChannel());
+ }
+ else {
+ Channel = Channels.Get( Channels.GetNextNormal( -1 ) );
+ }
+ }
if ( Channel == 0 )
throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") );