diff options
Diffstat (limited to 'pages/vlc.ecpp')
-rw-r--r-- | pages/vlc.ecpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index 050f716..065969c 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -4,6 +4,7 @@ #include <vdr/keys.h> #include "setup.h" #include "tools.h" +#include "users.h" using namespace std; using namespace vdrlive; @@ -23,6 +24,8 @@ using namespace vdrlive; <%include>page_init.eh</%include> <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + if (!cUser::CurrentUserHasRightTo(UR_STARTREPLAY)) + throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); bool asyncReq = !async.empty() && (lexical_cast<int>(async) != 0); @@ -96,9 +99,7 @@ using namespace vdrlive; <%cpp> #if TNTVERSION >= 1606 string server = request.getHost(); - if (Channel != 0) { - server = server.substr(0, server.rfind(':')); - } + server = server.substr(0, server.rfind(':')); #else string server = request.getServerIp(); #endif @@ -108,12 +109,7 @@ using namespace vdrlive; videourl = string("http://") + server + ":" + lexical_cast<string,int>(streamdevPort) + "/" + LiveSetup().GetStreamdevType() + "/" + *Channel->GetChannelID().ToString(); } else { -#if TNTVERSION >= 1606 -# define SERVER_AND_PORT server -#else -# define SERVER_AND_PORT server + ":" + lexical_cast<string,int>(LiveSetup().GetServerPort()); -#endif - videourl = string("http://") + SERVER_AND_PORT + "/recstream.html?recid=" + recid; + videourl = string("http://") + server + ":" + lexical_cast<string,int>(LiveSetup().GetServerPort()) + "/recstream.html?recid=" + recid; } </%cpp> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org/" version="VideoLAN.VLCPlugin.2" id="video1" name="video1" autoplay="yes" loop="no" width="720" height="576" target="<$ videourl $>" /> |