diff --git a/src/sectionsd/sectionsd.cpp b/src/sectionsd/sectionsd.cpp index f78cb16b3..12df63672 100644 --- a/src/sectionsd/sectionsd.cpp +++ b/src/sectionsd/sectionsd.cpp @@ -772,8 +772,12 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z MySIeventsOrderUniqueKey::iterator si = mySIeventsOrderUniqueKey.find(evt.uniqueKey()); bool already_exists = (si != mySIeventsOrderUniqueKey.end()); - if (already_exists) { + /* Check size of some descriptors of the new event before comparing + them with the old ones, because the same event can be complete + on one German Sky channel and incomplete on another one. So we + make sure to keep the complete event, if applicable. */ + if ((already_exists) && (evt.components.size() > 0)) { if (si->second->components.size() != evt.components.size()) already_exists = false; else { @@ -791,7 +795,9 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z c2++; } } - + } + + if ((already_exists) && (evt.linkage_descs.size() > 0)) { if (si->second->linkage_descs.size() != evt.linkage_descs.size()) already_exists = false; else { @@ -809,7 +815,9 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z } } } - + } + + if ((already_exists) && (evt.linkage_descs.size() > 0)) { if (si->second->ratings.size() != evt.ratings.size()) already_exists = false; else { @@ -825,7 +833,9 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z p2++; } } - + } + + if (already_exists) { if (si->second->times.size() != evt.times.size()) already_exists = false; else { @@ -866,10 +876,7 @@ static void addEvent(const SIevent &evt, const unsigned table_id, const time_t z } SIeventPtr e(eptr); - // If new extended event descriptor is empty use old one, if applicable - if ((e->getExtendedText().length() == 0) && (si != mySIeventsOrderUniqueKey.end()) && - (SIlanguage::getMode() == CSectionsdClient::LANGUAGE_MODE_OFF)) - e->setExtendedText("OFF",si->second->getExtendedText()); + //Strip ExtendedDescription if too far in the future if ((e->times.begin()->startzeit > zeit + secondsExtendedTextCache) && (SIlanguage::getMode() == CSectionsdClient::LANGUAGE_MODE_OFF) && (zeit != 0))