diff options
author | anbr <vdr07@deltab.de> | 2017-01-29 08:02:11 +0100 |
---|---|---|
committer | anbr <vdr07@deltab.de> | 2017-01-29 08:02:11 +0100 |
commit | 8f47569dbf9d30d5b85bfeaf5f6bc571cc41f25b (patch) | |
tree | 6bc19eb473df4ab802bac0a3330621b4cae67b51 | |
parent | f9814ed4ffb143189b561a6039b73eedc7df18bc (diff) | |
download | vdr-plugin-imonlcd-8f47569dbf9d30d5b85bfeaf5f6bc571cc41f25b.tar.gz vdr-plugin-imonlcd-8f47569dbf9d30d5b85bfeaf5f6bc571cc41f25b.tar.bz2 |
Fix: Current epg event don't shown, regression from commit:39ab2e50
-rw-r--r-- | watch.c | 44 |
1 files changed, 20 insertions, 24 deletions
@@ -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()); } } } |