[vdr] EPGSearch doesn't avoid repeats anymore?

Dominic Evans oldmanuk at gmail.com
Wed Nov 10 14:25:42 CET 2010


On 10/11/10 12:05, Teemu Suikki wrote:
> I think there is a bug in epgsearch.. See epgsearchtools.c line 806:
>
>     if ((!compareTitle || Title1 == Title2)&&
>         (!compareSubtitle || (Subtitle1 == Subtitle2&&
> (compareSubtitle==2 || Subtitle1!=""))))
>
> I don't really understand the last check. Perhaps there should be "=="
> instead of "!=" or something?
>

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 :-)




More information about the vdr mailing list