- neutrinoyparser.cpp: improve display of channels w/o logo

This commit is contained in:
svenhoefer
2015-04-05 22:30:04 +02:00
parent fa68e5cf7e
commit 90277c9982

View File

@@ -353,6 +353,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
have_logos = true;
for(int j = 0; j < (int) channels.size(); 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) ? ("&amp;bouquet=" + itoa(BouquetNr)) : "";
yresult += "<tr>";
if(have_logos)
yresult += string_printf("<td class=\"%c logo_cell\" width=\"44\" rowspan=\"2\"><a href=\"javascript:do_zap('"
PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
"')\"><img class=\"channel_logo\" src=\"%s\"/></a></td>", classname, channel->getChannelID(),
(NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID())).c_str());
if (have_logos) {
std::string channel_logo = NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], channel->getChannelID());
std::string zaplink;
if (channel_logo.empty())
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 */
if(event && event->duration > 0)