yhook: remove unnecessary line feeds from plain output; ...

align control/getbouquet


Origin commit data
------------------
Branch: ni/coolstream
Commit: 89e0ba1a41
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-02-21 (Sun, 21 Feb 2016)

Origin message was:
------------------
- yhook: remove unnecessary line feeds from plain output; ...

align control/getbouquet


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-02-21 01:29:17 +01:00
parent 7066330e0c
commit c140f3eff3
2 changed files with 19 additions and 14 deletions

View File

@@ -1203,7 +1203,7 @@ void CControlAPI::GetBouquetsCGI(CyhookHandler *hh) {
bool encode = false;
std::string result = "";
TOutType outType = hh->outStart(true /*old mode*/);
TOutType outType = hh->outStart();
if (hh->ParamList["showhidden"] == "false")
show_hidden = false;
@@ -1241,9 +1241,13 @@ void CControlAPI::GetBouquetsCGI(CyhookHandler *hh) {
bouquet = std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str());
if (encode)
bouquet = encodeString(bouquet); // encode (URLencode) the bouquetname
item = hh->outPair("number", string_printf("%u", i + 1), true);
if(outType == plain) item+= " ";
item += hh->outPair("name", bouquet, false);
if (outType == plain)
item = string_printf("%u", i + 1) + " " + bouquet + "\n";
else
{
item = hh->outPair("number", string_printf("%u", i + 1), true);
item += hh->outPair("name", bouquet, false);
}
result += hh->outArrayItem("bouquet", item, (i < size-1));
}
}