summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-03-02 18:35:41 +0100
committerDimitar Petrovski <dimeptr@gmail.com>2012-03-02 18:35:41 +0100
commitacff803d168899971989e15429f1274dce55a35f (patch)
tree4477956e07a13cac8e2beebf97e7fd6990392673
parentc3a38eabb59bdb9b6ee631ed2220e09b6e528692 (diff)
downloadvdr-plugin-eepg-acff803d168899971989e15429f1274dce55a35f.tar.gz
vdr-plugin-eepg-acff803d168899971989e15429f1274dce55a35f.tar.bz2
create copy of equivalent event before adding
-rw-r--r--eepg.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/eepg.c b/eepg.c
index 10b1912..8574426 100644
--- a/eepg.c
+++ b/eepg.c
@@ -2991,12 +2991,40 @@ void cEIT2::updateEquivalent(cSchedules * Schedules, tChannelID channelID, cEven
} else {
LogD(1, prep("remove equivalent"));
pSchedule->DelEvent(pEqvEvent);
- pSchedule->AddEvent(pEvent);
+ cEvent* newEvent = new cEvent (pEvent->EventID());
+ newEvent->SetTableID (pEvent->TableID());
+ newEvent->SetStartTime (pEvent->StartTime());
+ newEvent->SetDuration (pEvent->Duration());
+ newEvent->SetVersion (pEvent->Version());
+ // newEvent->SetContents(pEvent->Contents());
+ newEvent->SetParentalRating(pEvent->ParentalRating());
+ newEvent->SetVps (pEvent->Vps());
+ newEvent->SetTitle (pEvent->Title ());
+ newEvent->SetShortText (pEvent->ShortText ());
+ newEvent->SetDescription (pEvent->Description ());
+ // newEvent->SetComponents (pEvent->Components());
+ newEvent->FixEpgBugs ();
+
+ pSchedule->AddEvent(newEvent);
}
} else {
LogD(1, prep("equivalent event does not exist"));
- pSchedule->AddEvent(pEvent);
+ cEvent* newEvent = new cEvent (pEvent->EventID());
+ newEvent->SetTableID (pEvent->TableID());
+ newEvent->SetStartTime (pEvent->StartTime());
+ newEvent->SetDuration (pEvent->Duration());
+ newEvent->SetVersion (pEvent->Version());
+// newEvent->SetContents(pEvent->Contents());
+ newEvent->SetParentalRating(pEvent->ParentalRating());
+ newEvent->SetVps (pEvent->Vps());
+ newEvent->SetTitle (pEvent->Title ());
+ newEvent->SetShortText (pEvent->ShortText ());
+ newEvent->SetDescription (pEvent->Description ());
+// newEvent->SetComponents (pEvent->Components());
+ newEvent->FixEpgBugs ();
+
+ pSchedule->AddEvent(newEvent);
}
}
}