mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
yWeb: /control/getchannelinfo changed.
Line 1: servicename
Line 2: epg now
Line 3: epg now duration X/Y
Line 4: epg next
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9a26bc91aa
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2024-05-03 (Fri, 03 May 2024)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -783,22 +783,26 @@ void CControlAPI::GetChannelInfoCGI(CyhookHandler *hh)
|
|||||||
result = hh->outObject("name", hh->outValue(channel->getName()) + "\n");
|
result = hh->outObject("name", hh->outValue(channel->getName()) + "\n");
|
||||||
|
|
||||||
CShortEPGData epg;
|
CShortEPGData epg;
|
||||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
CSectionsdClient::CurrentNextInfo CurrentNext;
|
||||||
CEitManager::getInstance()->getCurrentNextServiceKey(channel->getChannelID(), currentNextInfo);
|
CEitManager::getInstance()->getCurrentNextServiceKey(channel_id, CurrentNext);
|
||||||
|
|
||||||
if (CEitManager::getInstance()->getEPGidShort(currentNextInfo.current_uniqueKey, &epg))
|
if (CurrentNext.flags & CSectionsdClient::epgflags::has_current)
|
||||||
{
|
{
|
||||||
result += hh->outObject("title", hh->outValue(epg.title) + "\n");
|
result += hh->outObject("epg_now", hh->outValue(CurrentNext.current_name) + "\n");
|
||||||
|
result += hh->outObject("duration", string_printf("%d/", (abs(time(NULL) - CurrentNext.current_zeit.startzeit) + 30) / 60) + string_printf("%d\n", CurrentNext.current_zeit.dauer / 60));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result += hh->outObject("epg_now", "\n");
|
||||||
|
result += hh->outObject("duration", "0/0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
CChannelEvent event;
|
if (CurrentNext.flags & CSectionsdClient::epgflags::has_next)
|
||||||
NeutrinoAPI->GetChannelEvents();
|
|
||||||
NeutrinoAPI->GetChannelEvent(channel->getChannelID(), event);
|
|
||||||
|
|
||||||
if (event.eventID)
|
|
||||||
{
|
{
|
||||||
result += hh->outObject("duration", string_printf("%d/", (time(NULL) - event.startTime) / 60) + string_printf("%d\n", event.duration / 60));
|
result += hh->outObject("epg_next", hh->outValue(CurrentNext.next_name) + "\n");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
result += hh->outObject("epg_next", "\n");
|
||||||
|
|
||||||
hh->SendResult(result);
|
hh->SendResult(result);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user