mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
nhttpd controlapi: allow zapping to subchannels
based on idea by Moritz Venn <moritz.venn@freaque.net> Signed-off-by: Christian Schuett <Gaucho316@hotmail.com>
This commit is contained in:
committed by
Jacek Jendrzej
parent
847b08aedb
commit
59ca850ecc
@@ -1653,7 +1653,9 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
CSectionsdClient::LinkageDescriptorList desc;
|
||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo);
|
||||
if (CEitManager::getInstance()->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey,desc))
|
||||
|
||||
if (currentNextInfo.flags & CSectionsdClient::epgflags::current_has_linkagedescriptors &&
|
||||
CEitManager::getInstance()->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey, desc))
|
||||
{
|
||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(current_channel);
|
||||
t_satellite_position satellitePosition = channel->getSatellitePosition();
|
||||
@@ -1669,6 +1671,19 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!hh->ParamList["subchannel"].empty())
|
||||
{
|
||||
t_channel_id current_channel = NeutrinoAPI->Zapit->getCurrentServiceID();
|
||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo);
|
||||
if (currentNextInfo.flags & CSectionsdClient::epgflags::current_has_linkagedescriptors)
|
||||
{
|
||||
NeutrinoAPI->ZapToSubService(hh->ParamList["subchannel"].c_str());
|
||||
hh->SendOk();
|
||||
}
|
||||
else
|
||||
hh->SendError();
|
||||
}
|
||||
else if (hh->ParamList["name"] != "")
|
||||
{
|
||||
t_channel_id channel_id;
|
||||
|
Reference in New Issue
Block a user