- neutrino: add localized bouquet names

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-09-04 06:12:39 +02:00
committed by Thilo Graf
parent 9f18bf7960
commit 575357ac70
11 changed files with 46 additions and 35 deletions

View File

@@ -1619,7 +1619,7 @@ void CControlAPI::GetBouquetsCGI(CyhookHandler *hh)
channel_count = g_bouquetManager->Bouquets[i]->radioChannels.size() + g_bouquetManager->Bouquets[i]->tvChannels.size();
}
if (channel_count && (!g_bouquetManager->Bouquets[i]->bHidden || show_hidden) && (!fav || g_bouquetManager->Bouquets[i]->bUser)) {
bouquet = std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str());
bouquet = std::string(g_bouquetManager->Bouquets[i]->bName.c_str());
if (encode)
bouquet = encodeString(bouquet); // encode (URLencode) the bouquetname
if (outType == plain)
@@ -1774,7 +1774,7 @@ void CControlAPI::epgDetailList(CyhookHandler *hh)
for (int i = start_bouquet; i < bouquet_size; i++) {
channels = mode == CZapitClient::MODE_RADIO ? g_bouquetManager->Bouquets[i]->radioChannels : g_bouquetManager->Bouquets[i]->tvChannels;
std::string bouquet = std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str());
std::string bouquet = std::string(g_bouquetManager->Bouquets[i]->bName.c_str());
bouquet = encodeString(bouquet); // encode (URLencode) the bouquetname
std::string res_channels = "";
@@ -3320,7 +3320,7 @@ void CControlAPI::xmltvm3uCGI(CyhookHandler *hh)
for(int j = 0; j < (int) chanlist.size(); j++)
{
CZapitChannel * channel = chanlist[j];
std::string bouq_name = g_bouquetManager->Bouquets[i]->Name;
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=\""+NeutrinoAPI->getLogoFile(channel->getChannelID())+"\" group-title=\""+bouq_name+"\", "+channel->getName()+"\n";
result += url+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel->getChannelID())+"\n";

View File

@@ -229,8 +229,8 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st
sel=(nr==(i+1)) ? "selected=\"selected\"" : "";
if(!channels.empty() && (!g_bouquetManager->Bouquets[i]->bHidden || do_show_hidden == "true"))
yresult += string_printf("<option value=%u %s>%s</option>\n", i + 1, sel.c_str(),
std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) :g_bouquetManager->Bouquets[i]->Name.c_str()).c_str());
//yresult += string_printf("<option value=%u %s>%s</option>\n", i + 1, sel.c_str(), (encodeString(std::string(g_bouquetManager->Bouquets[i]->Name.c_str()))).c_str());
std::string(g_bouquetManager->Bouquets[i]->bName.c_str()).c_str());
//yresult += string_printf("<option value=%u %s>%s</option>\n", i + 1, sel.c_str(), (encodeString(std::string(g_bouquetManager->Bouquets[i]->bName.c_str()))).c_str());
}
return yresult;
}
@@ -254,7 +254,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler *
else
g_bouquetManager->Bouquets[i]->getTvChannels(channels);
if(!channels.empty() && (!g_bouquetManager->Bouquets[i]->bHidden || do_show_hidden == "true")) {
yresult += string_printf(ytemplate.c_str(), i + 1, g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str());
yresult += string_printf(ytemplate.c_str(), i + 1, g_bouquetManager->Bouquets[i]->bName.c_str());
yresult += "\r\n";
}
}
@@ -1205,9 +1205,9 @@ std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std::
yresult += string_printf(para.c_str(), classname, akt.c_str(),
i + 1, lock_action.c_str(), lock_img.c_str(), lock_alt.c_str(), //lock
i + 1, hidden_action.c_str(), hidden_img.c_str(), hidden_alt.c_str(), //hhidden
i + 1, bouquet->Name.c_str(), bouquet->Name.c_str(), //link
i + 1, bouquet->Name.c_str(), //rename
i + 1, bouquet->Name.c_str(), //delete
i + 1, bouquet->bName.c_str(), bouquet->bName.c_str(), //link
i + 1, bouquet->bName.c_str(), //rename
i + 1, bouquet->bName.c_str(), //delete
down_show.c_str(), i + 1, //down arrow
up_show.c_str(), i + 1); //up arrow
}