mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +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>
Origin commit data
------------------
Branch: ni/coolstream
Commit: 59ca850ecc
Author: Christian Schuett <Gaucho316@hotmail.com>
Date: 2014-11-02 (Sun, 02 Nov 2014)
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Jacek Jendrzej
parent
12ced06e44
commit
5938d70f36
@@ -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