mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- yWeb: port "Tuxbox.DisplayLogos" from martii
This commit is contained in:
@@ -112,6 +112,7 @@ const CNeutrinoYParser::TyFuncCall CNeutrinoYParser::yFuncCallList[]=
|
||||
{"get_channels_as_dropdown", &CNeutrinoYParser::func_get_channels_as_dropdown},
|
||||
{"get_bouquets_with_epg", &CNeutrinoYParser::func_get_bouquets_with_epg},
|
||||
{"get_actual_channel_id", &CNeutrinoYParser::func_get_actual_channel_id},
|
||||
{"get_logo_name", &CNeutrinoYParser::func_get_logo_name},
|
||||
{"get_mode", &CNeutrinoYParser::func_get_mode},
|
||||
{"get_video_pids", &CNeutrinoYParser::func_get_video_pids},
|
||||
{"get_audio_pid", &CNeutrinoYParser::func_get_radio_pid},
|
||||
@@ -351,7 +352,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
|
||||
std::string timestr;
|
||||
bool have_logos = false;
|
||||
|
||||
if(!hh->WebserverConfigList["Tuxbox.LogosURL"].empty())
|
||||
if (!hh->WebserverConfigList["Tuxbox.LogosURL"].empty() && hh->WebserverConfigList["Tuxbox.DisplayLogos"] == "true" )
|
||||
have_logos = true;
|
||||
|
||||
for(int j = 0; j < (int) channels.size(); j++)
|
||||
@@ -522,6 +523,20 @@ std::string CNeutrinoYParser::func_get_actual_channel_id(CyhookHandler *, std::
|
||||
{
|
||||
return string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, CZapit::getInstance()->GetCurrentChannelID());
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// func: Get Logo Name
|
||||
//-------------------------------------------------------------------------
|
||||
std::string CNeutrinoYParser::func_get_logo_name(CyhookHandler *hh, std::string channelId)
|
||||
{
|
||||
if (hh->WebserverConfigList["Tuxbox.DisplayLogos"] == "true") {
|
||||
t_channel_id cid;
|
||||
if (1 == sscanf(channelId.c_str(), "%llx", &cid))
|
||||
return NeutrinoAPI->getLogoFile(hh->WebserverConfigList["Tuxbox.LogosURL"], cid);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// y-func : get_mode (returns tv|radio|unknown)
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -36,6 +36,7 @@ private:
|
||||
std::string func_get_actual_bouquet_number(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_channels_as_dropdown(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_actual_channel_id(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_logo_name(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_bouquets_with_epg(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_mode(CyhookHandler *hh, std::string para);
|
||||
std::string func_get_video_pids(CyhookHandler *hh, std::string para);
|
||||
|
Reference in New Issue
Block a user