summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-10-21 17:35:01 (GMT)
committerDimitar Petrovski <dimeptr@gmail.com>2012-10-21 17:35:01 (GMT)
commit384796b93d7f28a291fad50a3143d65176037af1 (patch)
treea77287bab7edf995cf84db028fac418566534fa1 /util.c
parentdf5e0613eac71ab69e59dda0cd7dfa2328c424d4 (diff)
downloadvdr-plugin-eepg-384796b93d7f28a291fad50a3143d65176037af1.tar.gz
vdr-plugin-eepg-384796b93d7f28a291fad50a3143d65176037af1.tar.bz2
delete event from local list befora adding it to schedule. this fixes all problems with sorting since correct events are in previous / next
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/util.c b/util.c
index ae8c869..fb45360 100644
--- a/util.c
+++ b/util.c
@@ -213,17 +213,16 @@ void cAddEventThread::Action(void)
while (((*it).second->First()) != NULL) {
cEvent* event = (*it).second->First();
- cEvent *pEqvEvent = (cEvent *) schedule->GetEvent (event->EventID(), event->StartTime());
+/* cEvent *pEqvEvent = (cEvent *) schedule->GetEvent (event->EventID(), event->StartTime());
if (pEqvEvent){
LogD (0, prep("schedule->DelEvent(event)"));
schedule->DelEvent(pEqvEvent);
}
-
+*/
LogD (0, prep("schedule->AddEvent(event)"));
//cCondWait::SleepMs(10);
- if (event)
- schedule->AddEvent(event);
- (*it).second->Del(event);
+ (*it).second->Del(event, false);
+ schedule->AddEvent(event);
}
EpgHandlers.SortSchedule(schedule);
//sortSchedules(schedules, (*it).first);