From 21dce4ff58c6e1da3691a874ca03cf77c696cda4 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Wed, 13 Jun 2007 20:47:04 +0000 Subject: - Select current channel in schedules, if no channel is given. Fixes #308 --- doc/ChangeLog | 6 ++++++ pages/schedule.ecpp | 15 +++++++++++---- 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 + + * 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 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 #include #include +#include #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?") ); -- cgit v1.2.3