From 0228a984b44717e7866c126fbe0a2eba68f0a5c3 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sat, 21 Jun 2008 19:52:46 +0200 Subject: Use the previous commited functionality to stream recordings. The recordings now have a stream button beneath them. --- pages/vlc.ecpp | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) (limited to 'pages/vlc.ecpp') diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index 6245c90..aea5560 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -12,6 +12,7 @@ using namespace vdrlive; <%args> tChannelID channel; string async; + string recid; <%session scope="global"> bool logged_in(false); @@ -23,18 +24,24 @@ using namespace vdrlive; <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - pageTitle = tr("VLC: live video stream"); - bool asyncReq = !async.empty() && (lexical_cast(async) != 0); - ReadLock channelsLock(Channels); + // the availabilty of Channel signals that we will do live tv streaming. + Channel = 0; + if (recid.empty()) { + pageTitle = tr("VLC: live video stream"); + ReadLock channelsLock(Channels); - if (!channelsLock) { - throw HtmlError(tr("Couldn't aquire access to channels, please try again later.")); + if (!channelsLock) { + throw HtmlError(tr("Couldn't aquire access to channels, please try again later.")); + } + Channel = Channels.GetByChannelID(channel); + if (Channel == 0) { + throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") ); + } } - Channel = Channels.GetByChannelID(channel); - if (Channel == 0) { - throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") ); + else { + pageTitle = tr("VLC: play recording"); } <& pageelems.doc_type &> @@ -57,7 +64,9 @@ using namespace vdrlive;