diff -Naur live-0.2.0.org/pages/remote.ecpp.org live-0.2.0/pages/remote.ecpp --- live-0.2.0.org/pages/remote.ecpp.org 2008-10-14 10:04:10.000000000 -0600 +++ live-0.2.0/pages/remote.ecpp 2009-03-10 14:05:09.000000000 -0600 @@ -2,6 +2,7 @@ #include #include #include +#include #include "grab.h" #include "setup.h" #include "tools.h" @@ -10,9 +11,15 @@ using namespace vdrlive; +<%args> + int channel = -1; + <%session scope="global"> bool logged_in(false); +<%request scope="page"> + cChannel* Channel; + <%include>page_init.eh <{ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); @@ -20,6 +27,25 @@ <%cpp> pageTitle = tr("Remote Control"); + ReadLock channelsLock( Channels ); + if ( !channelsLock ) + throw HtmlError( tr("Couldn't aquire access to channels, please try again later.") ); + + // cChannel* Channel; (see %request above) + if ( channel > 0 ) { + Channel = Channels.GetByNumber( channel ); + } + 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?") ); + <& pageelems.doc_type &> @@ -149,5 +175,5 @@ <%include>page_exit.eh <%def remote_actions> -<$ tr("Interval") $>: +<$ tr("Snapshot interval") $>:           <& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) linkText=(tr("Stream into browser")) &> diff -Naur live-0.2.0.org/pages/schedule.ecpp live-0.2.0/pages/schedule.ecpp --- live-0.2.0.org/pages/schedule.ecpp 2008-03-22 17:10:43.000000000 -0600 +++ live-0.2.0/pages/schedule.ecpp 2009-03-08 19:52:58.000000000 -0600 @@ -145,5 +145,5 @@ <%include>page_exit.eh <%def channel_selection> -
<& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &> <& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) linkText=(tr("Stream into browser")) &>
+
<& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &>
diff -Naur live-0.2.0.org/pages/vlc.ecpp live-0.2.0/pages/vlc.ecpp --- live-0.2.0.org/pages/vlc.ecpp 2007-12-24 05:56:04.000000000 -0700 +++ live-0.2.0/pages/vlc.ecpp 2009-03-08 18:01:10.000000000 -0600 @@ -125,7 +125,7 @@ <%cpp> } -

<$ tr("VLC media URL") $>: <$ videourl $>

+

<$ tr("VLC media URL") $>: <$ videourl $>

diff -Naur live-0.2.0.org/pages/whats_on.ecpp live-0.2.0/pages/whats_on.ecpp --- live-0.2.0.org/pages/whats_on.ecpp 2008-04-20 16:35:22.000000000 -0600 +++ live-0.2.0/pages/whats_on.ecpp 2009-03-08 18:38:38.000000000 -0600 @@ -173,7 +173,7 @@