mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
controlapi/epg: add fallback when no channel or bouquet is given
This function needs a fix, because "bouquetnr=all" breakes json output.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 911f333a7f
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-02-24 (Wed, 24 Feb 2016)
Origin message was:
------------------
- controlapi/epg: add fallback when no channel or bouquet is given
This function needs a fix, because "bouquetnr=all" breakes json output.
------------------
This commit was generated by Migit
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