mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
sectionsd: replace existing events with event from lower table ID
If we get a new epg event whose eventID is already existing, still replace the existing event if the table ID of the new event is lower. This comes from the observation that the lower table IDs have the "more current" events: Table 0x60-0x6f: other TS, scheduled 0x50-0x5f: current TS, scheduled 0x4f: other TS, current/next 0x4e: current TS, current/next So, at at least in theory, an event from table 0x4e should always be "better" than one from 0x60. If you see any regressions, don't hesitate to report them. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1382 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -780,6 +780,14 @@ 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 && (evt.table_id < si->second->table_id))
|
||||
{
|
||||
/* if the new event has a lower (== more recent) table ID, replace the old one */
|
||||
already_exists = false;
|
||||
dprintf("replacing event %016llx:%02x with %04x:%02x '%.40s'\n", si->second->uniqueKey(),
|
||||
si->second->table_id, evt.eventID, evt.table_id, evt.getName().c_str());
|
||||
}
|
||||
|
||||
/* 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
|
||||
|
Reference in New Issue
Block a user