diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-03-02 18:35:41 +0100 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-03-02 18:35:41 +0100 |
commit | acff803d168899971989e15429f1274dce55a35f (patch) | |
tree | 4477956e07a13cac8e2beebf97e7fd6990392673 | |
parent | c3a38eabb59bdb9b6ee631ed2220e09b6e528692 (diff) | |
download | vdr-plugin-eepg-acff803d168899971989e15429f1274dce55a35f.tar.gz vdr-plugin-eepg-acff803d168899971989e15429f1274dce55a35f.tar.bz2 |
create copy of equivalent event before adding
-rw-r--r-- | eepg.c | 32 |
1 files changed, 30 insertions, 2 deletions
@@ -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); } } } |