diff --git a/README b/README
index 8d3c5169..0d07615d 100644
--- a/README
+++ b/README
@@ -106,10 +106,11 @@ You can also specifiy this parameter via commandline:
Additional SSL options are available now. See "How to make LIVE listen
for ssl connections" section below on hints how to setup SSL.
-To display images, you can use:
+To display images or channel logos, you can use:
-e <...> --epgimages=/path/to/epgimages use EPG images created by plugins like tvm2vdr
-t <...> --tvscraperimages=/path/to/tvscraperimages use images created by tvscraper DEPRECATED!
+ --chanlogos=/path/to/channellogos use channel logos (PNG only, case sensitive)
Example:
--tvscraperimages=/var/cache/vdr/plugins/tvscraper DEPRECATED!
Note: tvscraperimages is not required any more, live uses the internal service interface "GetEnvironment" for plugins to get this information from tvscraper/scraper2vdr
@@ -182,7 +183,7 @@ qualified dns name, you should use the ip LIVE is listening on.
Note: This is just a quick'n dirty way to create a SSL self-signed
certicate. Recent browsers (like Firefox 3) will complain about it
-because the certificate wasn´t signed by a known Certificate Authority
+because the certificate wasn´t signed by a known Certificate Authority
(CA).
diff --git a/live/css/styles.css b/live/css/styles.css
index 530915ee..5173a511 100644
--- a/live/css/styles.css
+++ b/live/css/styles.css
@@ -315,6 +315,9 @@ img.actor {
img.artwork {
width: 480px
}
+img.channel_logo {
+ max-height:32px; max-width:150px; vertical-align:middle;
+}
/* ##############################
# Infowin styles for epg infos
##############################
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index b0077802..5a2d96a1 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -238,6 +238,16 @@ if (type == "now") {
tChannelID chanId;
tEventID eventId;
EpgEvents::DecodeDomId(epgEvent->Id(), chanId, eventId);
+
+ // Searching for channel logos
+ std::string chanlogoimg("");
+ if (!LiveSetup().GetChanLogoDir().empty() ) {
+ std::string chanlogopath = LiveSetup().GetChanLogoDir() + epgEvent->Caption() + ".png";
+ struct stat chanfilebuf;
+ if (stat (chanlogopath.c_str(), &chanfilebuf) == 0) {
+ chanlogoimg = "
Caption() + ".png\" loading=\"lazy\" class=\"channel_logo\">";
+ }
+ }
%cpp>
<& pageelems.epg_tool_box detail=(0) epgid=(epgEvent->Id()) title=(epgEvent->Title()) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) lastCurrentChanel=(lastCurrentChanel ? 1 : 0) &>
@@ -261,7 +271,7 @@ if (type == "now") {
% }
- ">
+ | ">
|
% }
diff --git a/setup.cpp b/setup.cpp
index 660899b5..506a872b 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -74,6 +74,7 @@ bool Setup::ParseCommandLine( int argc, char* argv[] )
{ "sslport", required_argument, NULL, 's' },
{ "cert", required_argument, NULL, 'c' },
{ "key", required_argument, NULL, 'k' },
+ { "chanlogos", required_argument, NULL, '1' },
{ 0 }
};
@@ -92,6 +93,9 @@ bool Setup::ParseCommandLine( int argc, char* argv[] )
case 's': m_serverSslPort = atoi( optarg ); break;
case 'c': m_serverSslCert = optarg; break;
case 'k': m_serverSslKey = optarg; break;
+ case '1': m_chanlogodir = optarg;
+ if(!m_chanlogodir.empty() && m_chanlogodir[m_chanlogodir.length()-1] != '/') m_chanlogodir += "/";
+ break;
default: return false;
}
}
@@ -133,7 +137,8 @@ char const* Setup::CommandLineHelp() const
<< " -k KEY, --key=KEY full path to a custom ssl certificate key file\n"
<< " -l level, --log=level log level for tntnet (values: WARN, ERROR, INFO, DEBUG, TRACE)\n"
<< " -e , --epgimages= directory for epgimages\n"
- << " -t , --tvscraperimages= directory for tvscraper images\n";
+ << " -t , --tvscraperimages= directory for tvscraper images\n"
+ << " --chanlogos= directory for channel logos (PNG)\n";
m_helpString = builder.str();
}
return m_helpString.c_str();
diff --git a/setup.h b/setup.h
index 11ecabe5..327511b7 100644
--- a/setup.h
+++ b/setup.h
@@ -78,6 +78,7 @@ class Setup
cPlugin *GetPluginTvscraper() { return m_p_tvscraper; } // tvscraper
cPlugin *GetPluginScraper() { return m_p_scraper; } // tvscraper. Or, if not available, scraper2vdr
void SetTvscraperImageDir(const std::string &dir);
+ const std::string &GetChanLogoDir() const { return m_chanlogodir; }
bool GetShowChannelsWithoutEPG() const { return m_showChannelsWithoutEPG != 0; }
int GetMaxTooltipChars() const { return m_maxTooltipChars; }
@@ -142,6 +143,7 @@ class Setup
std::string m_tvscraperimagedir;
cPlugin *m_p_tvscraper;
cPlugin *m_p_scraper;
+ std::string m_chanlogodir;
// setup options
int m_lastChannel;
diff --git a/tntconfig.cpp b/tntconfig.cpp
index 77f631e8..e0f34783 100644
--- a/tntconfig.cpp
+++ b/tntconfig.cpp
@@ -218,7 +218,18 @@ namespace vdrlive {
"content",
GetResourcePath(),
"/img/$1.svg",
- "image/svg+xml");
+ "image/svg+xml");
+
+ // the following rule enables channel logo support
+ // inserted by 'flell' -- verified with above, but not counterchecked yet!
+ if (!LiveSetup().GetChanLogoDir().empty() ) {
+ MapUrl(app,
+ "^/chanlogos/(.+)\\.png",
+ "content",
+ LiveSetup().GetChanLogoDir(),
+ "/$1.png",
+ "image/png");
+ }
// the following rules provide a search scheme for images. The first
// rule where a image is found, terminates the search.