mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +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
@@ -797,6 +797,20 @@ ok<br>
|
|||||||
>>>http://dbox/control/setmode?record=stop<br>
|
>>>http://dbox/control/setmode?record=stop<br>
|
||||||
ok<br>
|
ok<br>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<b>Parameter:</b> subchannel=<channel_id> (64 bit, hexidecimal value)<br>
|
||||||
|
<b>Rueckgabe:</b><br>
|
||||||
|
<br>
|
||||||
|
Zappt auf den angegebenen Unterkanal.<br>
|
||||||
|
Als Rueckgabe ist im Erfolgsfall ok zu erwarten.<br>
|
||||||
|
<br>
|
||||||
|
<b>Rueckgabe-Format:</b> ok / error<br>
|
||||||
|
<div class="example">
|
||||||
|
Beispiel:<br>
|
||||||
|
<br>
|
||||||
|
>>>http://dbox/control/zapto?subchannel=1008500d4<br>
|
||||||
|
ok <br>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- ----------------------------------------------------------- -->
|
<!-- ----------------------------------------------------------- -->
|
||||||
<div class="title1"><a name="getmode"></a>8. Radio/TV Mode Abfrage</div>
|
<div class="title1"><a name="getmode"></a>8. Radio/TV Mode Abfrage</div>
|
||||||
|
@@ -1653,7 +1653,9 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
|||||||
CSectionsdClient::LinkageDescriptorList desc;
|
CSectionsdClient::LinkageDescriptorList desc;
|
||||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, 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);
|
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(current_channel);
|
||||||
t_satellite_position satellitePosition = channel->getSatellitePosition();
|
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"] != "")
|
else if (hh->ParamList["name"] != "")
|
||||||
{
|
{
|
||||||
t_channel_id channel_id;
|
t_channel_id channel_id;
|
||||||
|
Reference in New Issue
Block a user