[vdr] EPGSearch doesn't avoid repeats anymore?

Christian Wieninger cwieninger at gmx.de
Wed Nov 10 23:20:13 CET 2010


Hi,

well, the intended behaviour was:
setting 'if present': two events match if both have non empty episode 
names that match. If not, the events are handled as different, resulting 
in more eventually double recordings.
setting 'Yes': the match is achieved if the episode names match, also if 
both are empty. If the provider delivers no episode names for two 
different events, just one would be recorded.

IMHO, it seems the code should actually look like this:

     if ((!compareTitle || Title1 == Title2)&&
         (!compareSubtitle || (Subtitle1 == Subtitle2&&
(compareSubtitle==1 || Subtitle1!=""))))

please note the "compareSubtitle==1" ('Yes') instead of 
"compareSubtitle==2 ('If present').
BTW, this was the code of my first commit on 2008-12-03, that I 
'corrected' for any reason to the current code on the same day:

http://projects.vdr-developer.org/git/?p=vdr-plugin-epgsearch.git;a=history;f=epgsearchtools.c;h=71a83a19c1bd4c89aa0c0c2808d216e30b03ca34;hb=ba87be9b2650796a507249c098eca815bff9b5e5

The documentation should also be fixed to:

...Caution: if your EPG data has no episode names for different episodes
don't use option 'yes'! 'if present' will then be the better choice even 
if this
results in double recordings.

Probably it would be the best solution to drop the 'Yes' setting.

BR,
Christian


Am 10.11.2010 14:43, schrieb Dominic Evans:
> On 10/11/10 13:25, Dominic Evans wrote:
>> I don't think its a bug, it seems to be the intended function.
>>
>> 1) First it checks that we either said 'don't compare the title' or the
>> titles match (!compareTitle || Title1 == Title2)
>>
>> 2a) Then it ANDs this with a check that either we said 'don't compare
>> the subtitle' (!compareSubtitle) OR the subtitles match (Subtitle1 ==
>> Subtitle2) AND also we've either said 'only if present'
>> (compareSubtitle==2) OR at least one of the sub-titles is non-empty
>> (Subtitle1!="")
>>
>> I just don't know why its a useful function :-)
>
> I did a bit more digging and discovered this was a new option since 
> 0.9.25.beta7 and is listed in the HISTORY as:
>
>> Avoid repeats: 'Compare subtitle' has now a third value 'if present'
>> besides 'no' and 'yes'. With this setting epgsearch will classify two
>> events only as equal if their episode names match and are not empty.
>> Caution: if your EPG data has no episode names for different episodes
>> don't use this option! 'yes' will then be the better choice even if this
>> results in double recordings.
>
> I think the description here is incorrect though. "epgsearch will 
> classify two events only as equal if their episode names match and are 
> not empty" seems to be the behaviour when this option is set to 'yes', 
> not when it is set to the new 'if present' third value. The last 
> sentence also seems to be incorrect. 'if-present' is the optimal 
> choice if your EPG data doesn't always have episode names, using them 
> for the comparison if they're present, ignoring them if they're missing.
>
> For anyone interested, I've attached the git-diff of 53677636 (when 
> this was introduced).
>
>
> _______________________________________________
> vdr mailing list
> vdr at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.linuxtv.org/pipermail/vdr/attachments/20101110/e39a033e/attachment.htm>


More information about the vdr mailing list