mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
vdr-plugin-eepg: update to 0.0.7
This commit is contained in:
parent
6e51b25b40
commit
141fbf0dcc
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vdr-plugin-eepg"
|
||||
PKG_VERSION="6be7f2ee644aa33bd6e6e038548be8a85514272e"
|
||||
PKG_SHA256="f8698d8e72c4e1239a57ba4a0b2f54020270506d5dce7298f3080fcc8d59f56f"
|
||||
PKG_VERSION="0.0.7"
|
||||
PKG_SHA256="7ef5ffb0eb26895561215a7e24e4a33123d626c19d59cc0d1ea013c07209bc40"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://projects.vdr-developer.org/projects/plg-eepg"
|
||||
PKG_URL="https://github.com/vdr-projects/vdr-plugin-eepg/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -1,148 +0,0 @@
|
||||
From c958894e6a4fffff58b0dc276fc978616560192d Mon Sep 17 00:00:00 2001
|
||||
From: Rudi Heitbaum <rudi@heitbaum.com>
|
||||
Date: Fri, 13 Sep 2024 13:22:54 +0000
|
||||
Subject: [PATCH] fix build with vdr 2.7.1
|
||||
|
||||
---
|
||||
eepg.c | 12 ++++++++++++
|
||||
eit2.c | 8 ++++++++
|
||||
epghandler.c | 13 +++++++++++++
|
||||
equivhandler.c | 9 +++++++++
|
||||
util.c | 9 +++++++++
|
||||
5 files changed, 51 insertions(+)
|
||||
|
||||
diff --git a/eepg.c b/eepg.c
|
||||
index a78819d..d39581d 100644
|
||||
--- a/eepg.c
|
||||
+++ b/eepg.c
|
||||
@@ -1324,12 +1324,20 @@ void cFilterEEPG::WriteToSchedule(tChannelID channelID, cSchedules* pSchedules,
|
||||
cEvent *Event = NULL;
|
||||
if (ps/*[eq]*/) {
|
||||
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ Event = (cEvent *) ps->GetEventById (EventId); //since Nagra uses consistent EventIds, try this first
|
||||
+#else
|
||||
Event = (cEvent *) ps->GetEvent (EventId); //since Nagra uses consistent EventIds, try this first
|
||||
+#endif
|
||||
bool TableIdMatches = false;
|
||||
if (Event)
|
||||
TableIdMatches = (Event->TableID() == TableId);
|
||||
if (!Event || !TableIdMatches || abs(Event->StartTime() - (time_t) StartTime) > Duration * 60) //if EventId does not match, or it matched with wrong TableId, then try with StartTime
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ Event = (cEvent *) ps->GetEventByTime (StartTime);
|
||||
+#else
|
||||
Event = (cEvent *) ps->GetEvent (EventId, StartTime);
|
||||
+#endif
|
||||
}
|
||||
cEvent *newEvent = NULL;
|
||||
if (!Event) { //event is new
|
||||
@@ -3477,7 +3485,11 @@ void cFilterEEPG::ProcessPremiere(const u_char *& Data)
|
||||
}
|
||||
|
||||
bool newEvent = false;
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ cEvent *pEvent = (cEvent *) pSchedule->GetEventById (EventId);
|
||||
+#else
|
||||
cEvent *pEvent = (cEvent *) pSchedule->GetEvent (EventId, -1);
|
||||
+#endif
|
||||
if (!pEvent) {
|
||||
LogI(2, "(new)\n");
|
||||
pEvent = new cEvent (EventId);
|
||||
diff --git a/eit2.c b/eit2.c
|
||||
index 9ee190d..31aa816 100644
|
||||
--- a/eit2.c
|
||||
+++ b/eit2.c
|
||||
@@ -32,7 +32,11 @@ cEvent* cEIT2::ProcessEitEvent(cSchedule* pSchedule,const SI::EIT::Event* EitEve
|
||||
// int versionNumber = getVersionNumber();
|
||||
|
||||
cEvent *newEvent = NULL;
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ cEvent *pEvent = (cEvent *) pSchedule->GetEventByTime (EitEvent->getStartTime ());
|
||||
+#else
|
||||
cEvent *pEvent = (cEvent *) pSchedule->GetEvent (EitEvent->getEventId (), EitEvent->getStartTime ());
|
||||
+#endif
|
||||
if (!pEvent) {
|
||||
if (OnlyRunningStatus)
|
||||
return NULL;
|
||||
@@ -243,7 +247,11 @@ void cEIT2::ProcessEventDescriptors(bool ExternalData, int Source, u_char Tid,
|
||||
tChannelID(Source, channel->Nid(), channel->Tid(), tsed->getReferenceServiceId()));
|
||||
if (!rSchedule)
|
||||
break;
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ rEvent = rSchedule->GetEventById(tsed->getReferenceEventId());
|
||||
+#else
|
||||
rEvent = rSchedule->GetEvent(tsed->getReferenceEventId());
|
||||
+#endif
|
||||
if (!rEvent)
|
||||
break;
|
||||
pEvent->SetTitle(rEvent->Title());
|
||||
diff --git a/epghandler.c b/epghandler.c
|
||||
index 1e2db9f..a81bc86 100644
|
||||
--- a/epghandler.c
|
||||
+++ b/epghandler.c
|
||||
@@ -66,10 +66,23 @@ bool cEEpgHandler::HandleEitEvent(cSchedule* Schedule,
|
||||
modified = false;
|
||||
//VDR creates new event if the EitEvent StartTime is different than EEPG time so
|
||||
//the EPG event has to be deleted but the data should be kept
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ const cEvent *ev;
|
||||
+ if (EitEvent->getStartTime() > 0){
|
||||
+ ev = schedule->GetEventByTime(EitEvent->getStartTime());
|
||||
+ } else {
|
||||
+ ev = schedule->GetEventById(EitEvent->getEventId());
|
||||
+ }
|
||||
+#else
|
||||
const cEvent* ev = schedule->GetEvent(EitEvent->getEventId(),EitEvent->getStartTime());
|
||||
+#endif
|
||||
searchDuplicates = !ev; //if the event exist with a same start time, it is handled by SetShortText/SetDescription
|
||||
if (!ev){
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ ev = schedule->GetEventById(EitEvent->getEventId());
|
||||
+#else
|
||||
ev = schedule->GetEvent(EitEvent->getEventId());
|
||||
+#endif
|
||||
// remove shifted duplicates with same ID
|
||||
if (ev && ((ev->StartTime()>EitEvent->getStartTime() && ev->StartTime() < EitEvent->getStartTime()+EitEvent->getDuration())
|
||||
|| (EitEvent->getStartTime() > ev->StartTime() && EitEvent->getStartTime() < ev->EndTime()))) {
|
||||
diff --git a/equivhandler.c b/equivhandler.c
|
||||
index 75007ec..cd23d38 100644
|
||||
--- a/equivhandler.c
|
||||
+++ b/equivhandler.c
|
||||
@@ -143,7 +143,16 @@ void cEquivHandler::updateEquivalent(cSchedules * Schedules, tChannelID channelI
|
||||
if (equChannel) {
|
||||
LogD(2, prep("found Equivalent channel %s"), *equChannelID.ToString());
|
||||
cSchedule *pSchedule = (cSchedule *) Schedules->GetSchedule (equChannel, true);
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ cEvent *pEqvEvent;
|
||||
+ if (pEvent->StartTime() > 0){
|
||||
+ pEqvEvent = (cEvent *) pSchedule->GetEventByTime (pEvent->StartTime());
|
||||
+ } else {
|
||||
+ pEqvEvent = (cEvent *) pSchedule->GetEventById (pEvent->EventID());
|
||||
+ }
|
||||
+#else
|
||||
cEvent *pEqvEvent = (cEvent *) pSchedule->GetEvent (pEvent->EventID(), pEvent->StartTime());
|
||||
+#endif
|
||||
if (pEqvEvent) {
|
||||
LogD(3, prep("equivalent event exists"));
|
||||
if (pEqvEvent == pEvent) {
|
||||
diff --git a/util.c b/util.c
|
||||
index 1109181..029fcc6 100644
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -214,7 +214,16 @@ void cAddEventThread::Action(void)
|
||||
while (((*it).second->First()) != NULL) {
|
||||
cEvent* event = (*it).second->First();
|
||||
|
||||
+#if APIVERSNUM >= 20502
|
||||
+ cEvent *pEqvEvent;
|
||||
+ if (event->StartTime() > 0){
|
||||
+ pEqvEvent = (cEvent *) schedule->GetEventByTime (event->StartTime());
|
||||
+ } else {
|
||||
+ pEqvEvent = (cEvent *) schedule->GetEventById (event->EventID());
|
||||
+ }
|
||||
+#else
|
||||
cEvent *pEqvEvent = (cEvent *) schedule->GetEvent (event->EventID(), event->StartTime());
|
||||
+#endif
|
||||
if (pEqvEvent){
|
||||
(*it).second->Del(event);
|
||||
} else {
|
Loading…
x
Reference in New Issue
Block a user