summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2007-07-20 16:06:51 +0000
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2007-07-20 16:06:51 +0000
commit4fb0ce9c0662a7b7c3bce712577743e2a56444c0 (patch)
tree8143d3de6e9d966fa33269ea0c9d3f112468c82f /pages
parentb40d2c550444c61c25a1c2ec2dbd472dd11d2b62 (diff)
downloadvdr-plugin-live-4fb0ce9c0662a7b7c3bce712577743e2a56444c0.tar.gz
vdr-plugin-live-4fb0ce9c0662a7b7c3bce712577743e2a56444c0.tar.bz2
- Added support for EPG images: Specify the directory with your
EPG images via the new commandline option '-e <dir>' or '--epgimages=<dir> like -P'live -e /video/epgimages'
Diffstat (limited to 'pages')
-rw-r--r--pages/content.ecpp9
-rw-r--r--pages/pageelems.ecpp27
2 files changed, 19 insertions, 17 deletions
diff --git a/pages/content.ecpp b/pages/content.ecpp
index 1438790..f95dd4c 100644
--- a/pages/content.ecpp
+++ b/pages/content.ecpp
@@ -26,8 +26,15 @@ reply.setContentType(mime);
// FileCache::ptr_type f = LiveFileCache().get("/tmp/live/" + request.getPathInfo());
string path(request.getPathInfo());
-FileCache::ptr_type f = LiveFileCache().get(Plugin::GetConfigDirectory() + "/" + path);
+FileCache::ptr_type f;
+
+if (path.find(LiveSetup().GetEpgImageDir()) != 0)
+ f = LiveFileCache().get(Plugin::GetConfigDirectory() + "/" + path);
+else
+ f = LiveFileCache().get(path);
+
if (f.get() == 0) {
+cout << "declined" << endl;
return DECLINED;
}
string ctime = tnt::HttpMessage::htdate(f->ctime());
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 6de3bfc..1116d51 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -8,6 +8,7 @@
#include "setup.h"
#include "timers.h"
#include "tools.h"
+#include "epg_events.h"
using namespace std;
using namespace vdrlive;
@@ -34,25 +35,12 @@ int update_status(1);
<# ---------------------------------------------------------------------- #>
<%def logo>
-<%cpp>
- if (LiveSetup().GetShowLogo()
- || (LiveSetup().GetUseAjax() && LiveSetup().GetShowInfoBox())) {
-</%cpp>
<div class="page_header">
-<%cpp>
- if (LiveSetup().GetShowLogo()) {
-</%cpp>
<a href="<$ LiveSetup().GetStartScreenLink()$>">
<img src="<$ LiveSetup().GetThemedLink("img", "logo.png") $>" alt="VDR Live!" class="logo"></img></a>
-<%cpp>
- }
-</%cpp>
-<%cpp>if (LiveSetup().GetUseAjax() && LiveSetup().GetShowInfoBox()) { </%cpp><& infobox &><%cpp> } </%cpp>
+<%cpp>if (LiveSetup().GetShowInfoBox()) { </%cpp><& infobox &><%cpp> } </%cpp>
</div>
<div style="clear: both"></div>
-<%cpp>
- }
-</%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
@@ -136,7 +124,6 @@ int update_status(1);
<# ---------------------------------------------------------------------- #>
<%def ajax_js>
-<%cpp>if (LiveSetup().GetUseAjax()) { </%cpp>
<script type="text/javascript" src="js/mootools/mootools.v1.11.js"></script>
<script type="text/javascript" src="js/live/liveajax.js"></script>
<script type="text/javascript" src="js/live/infowin.js"></script>
@@ -153,7 +140,6 @@ int update_status(1);
});
--></script>
<%cpp> } </%cpp>
-<%cpp> } </%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
@@ -202,6 +188,15 @@ int update_status(1);
<div class="description">
<%cpp> reply.out() << StringEscapeAndBreak(long_descr); </%cpp>
</div>
+ <br/>
+ <div>
+<%cpp> list<string> images = EpgEvents::EpgImages(boxId);
+ for(std::list<std::string>::iterator it = images.begin(); it != images.end(); ++it ) {
+</%cpp>
+ <img src="/epgimages/<$ *it $>">
+<%cpp> }
+</%cpp>
+ </div>
</div>
</div>
</div>