mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
- controlapi/epg: add fallback when no channel or bouquet is given
This function needs a fix, because "bouquetnr=all" breakes json output.
This commit is contained in:
@@ -1527,6 +1527,7 @@ void CControlAPI::epgDetailList(CyhookHandler *hh) {
|
||||
else if (!(hh->ParamList["channelname"].empty())) {
|
||||
channel_id = NeutrinoAPI->ChannelNameToChannelId(hh->ParamList["channelname"].c_str());
|
||||
}
|
||||
|
||||
// or determine bouquetnr -> iterate the bouquet
|
||||
int bouquetnr = -1;
|
||||
bool all_bouquets = false;
|
||||
@@ -1538,6 +1539,13 @@ void CControlAPI::epgDetailList(CyhookHandler *hh) {
|
||||
bouquetnr--;
|
||||
}
|
||||
|
||||
// fallback
|
||||
if ((channel_id == (t_channel_id) -1) && (bouquetnr == -1))
|
||||
{
|
||||
channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
//all_bouquets = true; //better, but broken
|
||||
}
|
||||
|
||||
// ------ generate output ------
|
||||
hh->outStart(true /*old mode*/);
|
||||
std::string result = "";
|
||||
|
Reference in New Issue
Block a user