From 8f47569dbf9d30d5b85bfeaf5f6bc571cc41f25b Mon Sep 17 00:00:00 2001 From: anbr Date: Sun, 29 Jan 2017 08:02:11 +0100 Subject: Fix: Current epg event don't shown, regression from commit:39ab2e50 --- watch.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/watch.c b/watch.c index 7410339..3ea9b60 100644 --- a/watch.c +++ b/watch.c @@ -897,31 +897,27 @@ bool ciMonWatch::Program() { #endif if (chID.Valid() && schedules) { const cSchedule * schedule = schedules->GetSchedule(chID); - if (schedule) { - - if ((p = schedule->GetPresentEvent()) != NULL) { - - if(chPresentTime && chEventID != p->EventID()) { - bChanged = true; - chEventID = p->EventID(); - chPresentTime = p->StartTime(); - chFollowingTime = p->EndTime(); - - if(chPresentTitle) { - delete chPresentTitle; - chPresentTitle = NULL; - } - if (!isempty(p->Title())) { - chPresentTitle = new cString(p->Title()); - } + if (schedule && (p = schedule->GetPresentEvent()) != NULL) { + if(!chPresentTime || chEventID != p->EventID()) { + bChanged = true; + chEventID = p->EventID(); + chPresentTime = p->StartTime(); + chFollowingTime = p->EndTime(); + + if(chPresentTitle) { + delete chPresentTitle; + chPresentTitle = NULL; + } + if (!isempty(p->Title())) { + chPresentTitle = new cString(p->Title()); + } - if(chPresentShortTitle) { - delete chPresentShortTitle; - chPresentShortTitle = NULL; - } - if (!isempty(p->ShortText())) { - chPresentShortTitle = new cString(p->ShortText()); - } + if(chPresentShortTitle) { + delete chPresentShortTitle; + chPresentShortTitle = NULL; + } + if (!isempty(p->ShortText())) { + chPresentShortTitle = new cString(p->ShortText()); } } } -- cgit v1.2.3