mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- neutrinoyparser.cpp: improve display of channels w/o logo
This commit is contained in:
@@ -353,6 +353,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
|||||||
|
|
||||||
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
|
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
|
||||||
have_logos = true;
|
have_logos = true;
|
||||||
|
|
||||||
for(int j = 0; j < (int) channels.size(); j++)
|
for(int j = 0; j < (int) channels.size(); j++)
|
||||||
{
|
{
|
||||||
CZapitChannel * channel = channels[j];
|
CZapitChannel * channel = channels[j];
|
||||||
@@ -366,11 +367,33 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
|||||||
std::string bouquetstr = (BouquetNr >= 0) ? ("&bouquet=" + itoa(BouquetNr)) : "";
|
std::string bouquetstr = (BouquetNr >= 0) ? ("&bouquet=" + itoa(BouquetNr)) : "";
|
||||||
yresult += "<tr>";
|
yresult += "<tr>";
|
||||||
|
|
||||||
if(have_logos)
|
if (have_logos) {
|
||||||
yresult += string_printf("<td class=\"%c logo_cell\" width=\"44\" rowspan=\"2\"><a href=\"javascript:do_zap('"
|
std::string channel_logo = NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID());
|
||||||
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
|
std::string zaplink;
|
||||||
"')\"><img class=\"channel_logo\" src=\"%s\"/></a></td>", classname, channel->getChannelID(),
|
if (channel_logo.empty())
|
||||||
(NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID())).c_str());
|
zaplink = channel->getName().c_str();
|
||||||
|
else
|
||||||
|
zaplink = string_printf(
|
||||||
|
"<img class=\"channel_logo\" src=\"%s\" title=\"%s\" alt=\"%s\" />"
|
||||||
|
, channel_logo.c_str()
|
||||||
|
, channel->getName().c_str()
|
||||||
|
, channel->getName().c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
yresult += string_printf(
|
||||||
|
"<td class=\"%c logo_cell %s\" width=\"44\" rowspan=\"2\">"
|
||||||
|
"<a href=\"javascript:do_zap('"PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS"')\">"
|
||||||
|
"%s"
|
||||||
|
"</a>"
|
||||||
|
"</td>"
|
||||||
|
, classname
|
||||||
|
, (channel_logo.empty() ? "no_logo" : "")
|
||||||
|
, channel->getChannelID()
|
||||||
|
, zaplink.c_str()
|
||||||
|
, channel->getName().c_str()
|
||||||
|
, channel->getName().c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* timer slider */
|
/* timer slider */
|
||||||
if(event && event->duration > 0)
|
if(event && event->duration > 0)
|
||||||
|
Reference in New Issue
Block a user