- controlapi: fix xmltv.m3u output for channels without logo

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-09-09 14:09:43 +02:00
committed by Thilo Graf
parent e3d609759d
commit aab7e7d64d

View File

@@ -3325,7 +3325,13 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
CZapitChannel *channel = chanlist[j];
std::string bouq_name = g_bouquetManager->Bouquets[i]->bName;
std::string chan_id_short = string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID() & 0xFFFFFFFFFFFFULL);
result += "#EXTINF:-1 tvg-id=\"" + chan_id_short + "\" tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\" group-title=\"" + bouq_name + "\"," + channel->getName() + "\n";
result += "#EXTINF:-1 tvg-id=\"" + chan_id_short + "\"";
if (!NeutrinoAPI->getLogoFile(channel->getChannelID()).empty())
result += " tvg-logo=\"" + host + NeutrinoAPI->getLogoFile(channel->getChannelID()) + "\"";
else
result += " tvg-logo=\"\"";
result += " group-title=\"" + bouq_name + "\",";
result += channel->getName() + "\n";
result += url + string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID()) + "\n";
}
}