summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2009-04-17 00:02:58 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2009-04-17 00:02:58 +0200
commitd2a03a79176fce81ebe87b2263fa988df1eb547c (patch)
tree0a8d050cbcd44d371d1b5fc959ce4fd1c3610038 /pages
parente3343f602dfe288afa1f027563d307d049d95c1e (diff)
downloadvdr-plugin-live-d2a03a79176fce81ebe87b2263fa988df1eb547c.tar.gz
vdr-plugin-live-d2a03a79176fce81ebe87b2263fa988df1eb547c.tar.bz2
Integrated a patch against LIVE 0.2.0 which adds channel numbers.
The patch was contributed by John Germs, Chavonbravo from CaptiveWorks (see http://captiveworks.org/open-source/vdr-live/ )
Diffstat (limited to 'pages')
-rw-r--r--pages/remote.ecpp28
-rw-r--r--pages/schedule.ecpp9
-rw-r--r--pages/vlc.ecpp2
-rw-r--r--pages/whats_on.ecpp4
4 files changed, 38 insertions, 5 deletions
diff --git a/pages/remote.ecpp b/pages/remote.ecpp
index 4805728..dd45cd0 100644
--- a/pages/remote.ecpp
+++ b/pages/remote.ecpp
@@ -2,6 +2,7 @@
#include <locale>
#include <vdr/i18n.h>
#include <vdr/keys.h>
+#include <vdr/device.h>
#include "grab.h"
#include "setup.h"
#include "tools.h"
@@ -10,9 +11,15 @@ using namespace std;
using namespace vdrlive;
</%pre>
+<%args>
+ int channel = -1;
+</%args>
<%session scope="global">
bool logged_in(false);
</%session>
+<%request scope="page">
+ cChannel* Channel;
+</%request>
<%include>page_init.eh</%include>
<{
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
@@ -20,6 +27,25 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<%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?") );
+
</%cpp>
<& pageelems.doc_type &>
<html>
@@ -127,5 +153,5 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<%include>page_exit.eh</%include>
<%def remote_actions>
-<$ tr("Interval") $>: <select name="interval" onchange="ChangeInterval()"></select>
+<$ tr("Snapshot interval") $>: <select name="interval" onchange="ChangeInterval()"></select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &>
</%def>
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index 544136b..8a77059 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -145,5 +145,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<%include>page_exit.eh</%include>
<%def channel_selection>
-<form action="schedule.html" method="get" id="channels"><span><label for="channel"><$ tr("Show schedule of channel") $>: </label><& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &> <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(Channel->GetChannelID()) image="zap.png" alt="" &><& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &></span></form>
+<form action="schedule.html" method="get" id="channels">
+ <span>
+ <label for="channel"><$ tr("Channel") $>:&nbsp;<span class="bold"><$ Channel->Number() $></span></label>
+ <& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &>
+ <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(Channel->GetChannelID()) image="zap.png" alt="" &>
+ <& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &>
+ </span>
+</form>
</%def>
diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp
index d1afd67..050f716 100644
--- a/pages/vlc.ecpp
+++ b/pages/vlc.ecpp
@@ -145,7 +145,7 @@ using namespace vdrlive;
<%cpp>
}
</%cpp>
-<!-- --><p><$ tr("VLC media URL") $>: <$ videourl $></p><!-- -->
+<!-- --><p><$ tr("VLC media URL") $>: <span class="bold"><a href="<$ videourl $>"><$ videourl $></a></span></p><!-- -->
</div>
</%def>
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index 316c03b..8232875 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -195,7 +195,7 @@ if (type == "now") {
</%cpp>
<div class="event">
<div class="station">
- <div><div><div><a href="schedule.html?channel=<$ chNumber $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ (epgEvent->Caption()) $></a></div></div></div>
+ <div><div><div><a href="schedule.html?channel=<$ chNumber $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ chNumber $><$ tr(" - ") $><$ (epgEvent->Caption()) $></a></div></div></div>
</div>
<div class="content">
<div class="tools">
@@ -242,7 +242,7 @@ if (type == "now") {
% }
</div>
</td>
- <td class="topaligned rightcol <? lastCurrentChanel ? "bottomrow"?>"><div class="station withmargin"><a href="schedule.html?channel=<$ chNumber $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ (epgEvent->Caption()) $></a></div>
+ <td class="topaligned rightcol <? lastCurrentChanel ? "bottomrow"?>"><div class="station withmargin"><a href="schedule.html?channel=<$ chNumber $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ chNumber $><$ tr(" - ") $><$ (epgEvent->Caption()) $></a></div>
</td>
</tr>
% }