-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9318 from heitbaum/vdr12
[le12] vdr-addon: update to 2.7.1 and addon (2)
- Loading branch information
Showing
8 changed files
with
205 additions
and
13 deletions.
There are no files selected for viewing
148 changes: 148 additions & 0 deletions
148
...ds/vdr-plugins/vdr-plugin-eepg/patches/vdr-plugin-eepg-PR2-fix-build-with-vdr-2-7-1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
From c958894e6a4fffff58b0dc276fc978616560192d Mon Sep 17 00:00:00 2001 | ||
From: Rudi Heitbaum <[email protected]> | ||
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...ins/vdr-plugin-xmltv2vdr/patches/vdr-plugin-xmltv2vdr-04-fixed-import-for-vdr-2-7-1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From 4ee9769b5746240247c3a01f4000afdf8fc56857 Mon Sep 17 00:00:00 2001 | ||
From: joed74 <[email protected]> | ||
Date: Tue, 10 Sep 2024 15:57:59 +0200 | ||
Subject: [PATCH] Fixed import for vdr 2.7.1 | ||
|
||
--- | ||
import.cpp | 12 ++++++++++++ | ||
1 file changed, 12 insertions(+) | ||
|
||
diff --git a/import.cpp b/import.cpp | ||
index 1bb1849..8c73024 100644 | ||
--- a/import.cpp | ||
+++ b/import.cpp | ||
@@ -86,7 +86,11 @@ cEvent *cImport::SearchVDREventByTitle(cEPGSource *source, cSchedule* schedule, | ||
const char *cxTitle=conv->Convert(Title); | ||
|
||
// 2nd with StartTime | ||
+#if VDRVERSNUM >= 20701 | ||
+ cEvent *f=(cEvent *) schedule->GetEventByTime(StartTime+hint); | ||
+#else | ||
cEvent *f=(cEvent *) schedule->GetEvent((tEventID) 0,StartTime+hint); | ||
+#endif | ||
if (f) | ||
{ | ||
if (!strcasecmp(f->Title(),cxTitle)) | ||
@@ -188,10 +192,18 @@ cEvent *cImport::SearchVDREvent(cEPGSource *source, cSchedule* schedule, cXMLTVE | ||
|
||
// try to find an event, | ||
// 1st with our own EventID | ||
+#if VDRVERSNUM >= 20701 | ||
+ if (xevent->EITEventID()) f=(cEvent *) schedule->GetEventById(xevent->EITEventID()); | ||
+#else | ||
if (xevent->EITEventID()) f=(cEvent *) schedule->GetEvent(xevent->EITEventID()); | ||
+#endif | ||
if (f) return f; | ||
|
||
+#if VDRVERSNUM >= 20701 | ||
+ if (xevent->EventID() && append) f=(cEvent *) schedule->GetEventById(xevent->EITEventID()); | ||
+#else | ||
if (xevent->EventID() && append) f=(cEvent *) schedule->GetEvent(xevent->EventID()); | ||
+#endif | ||
if (f) return f; | ||
|
||
f=SearchVDREventByTitle(source, schedule, xevent->Title(), xevent->StartTime(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters