[vdr] Patch: Eliminate duplicate events when using xmltv2vdr
Klaus.Schmidinger at tvdr.de
Thu Jan 12 16:28:51 CET 2012
On 14.10.2011 16:25, Timo Eskola wrote:
> I started to use xmltv2vdr for some channels with poor EPG data. I do not want to use xmltv2vdr for all channels so I modified xmltv2vdr.pl <http://xmltv2vdr.pl> script to clear only the channels which will be grabbed with xmltv. The result was multiple EPG events for some programs. I found 2 issues
> in VDR code that caused this.
> 1. CLRE for a channel does not always clear all events. I compared CLRE for clearing all channels and noticed that it also clears events in timers. The patch will add this to CLRE for a channel.
Adopted for version 1.7.23.
> 2. Second problem was that for some reason there are small differences in events times in EPG and xmltv. The patch find events close to the current event during EPG scan.
I don't see why you are adding 'Duration / 2' here.
The call to
GetEventAround(StartTime + Around)
that you have introduced in your patch searches for the
event closest to the "middle" of the event in question.
Shouldn't you look for an event closest to the *start*
of the given event? That would obsolete the new 'Around'
parameter and the actual call could simply be
What I don't like about this whole thing is that it totally
defeats the purpose of the eventsHashStartTime hash table, which
has been introduced to make this lookup faster. I'm afraid I can't
accept this patch because of this.
> Now I have proper program data from EPG and xmltv.
> Maybe Klaus can have a look if the changes can be implemented in VDR.
More information about the vdr