Hi,
I recently updated my VDR from 1.4.5 to 1.7.15, and also updated all plugins to their latest version. EPGSearch is epgsearch-0.9.25.beta17.
Everything works, but epgsearch doesn't avoid repeats anymore! Here's an example from the file epgsearchdone.data:
----------------
R 1266873900 1800 0 C T-8438-8193-65 T Frasier D Kevyt-Frasier. KACL haastaa kilpailevan KPXY-aseman painonpudotuskisaan, ja vastapuolen tiimiss<E4> on Frasierin lukioaikainen koulukiusaaja. Niles ja Martin puolestaan hoivaavat ikkunaan t<F6>rm<E4>nnytt<E4> lintua. Amerikkalainen komediasarja. 11. @ <epgsearch><channel>4 - Nelonen</channel><searchtimer>Frasier</searchtimer><start>1266873600</start><stop>1266876300</stop><s-id>0</s-id><eventid>436</eventid></epgsearch> r
----- some time later ----
R 1289337600 1800 0 C T-8438-8193-65 T Frasier D Kevyt-Frasier. KACL haastaa kilpailevan KPXY-aseman painonpudotuskisaan, ja vastapuolen tiimiss<E4> on Frasierin lukioaikainen koulukiusaaja. Niles ja Martin puolestaan hoivaavat ikkunaan t<F6>rm<E4>nnytt<E4> lintua. Amerikkalainen komediasarja. 11. @ <epgsearch><channel>4 - Nelonen</channel><searchtimer>Frasier</searchtimer><start>1289337300</start><stop>1289340000</stop><s-id>0</s-id><eventid>11873</eventid></epgsearch> r
-----------------
Why doesn't it match? The descriptions are 100% identical.
On 10/11/10 09:09, Teemu Suikki wrote:
Why doesn't it match? The descriptions are 100% identical.
Check your search timer's configuration for comparing 'sub-title' when avoiding repeats. Compare subtitle should be set to either 'No' or 'If present', otherwise the comparison will also return false if your EPG doesn't contain a subtitle for the entry.
2010/11/10 Dominic Evans oldmanuk@gmail.com:
On 10/11/10 09:09, Teemu Suikki wrote:
Why doesn't it match? The descriptions are 100% identical.
Check your search timer's configuration for comparing 'sub-title' when avoiding repeats. Compare subtitle should be set to either 'No' or 'If present', otherwise the comparison will also return false if your EPG doesn't contain a subtitle for the entry.
Hey, that was it! Thanks a bunch. :)
On 10/11/10 10:09, Teemu Suikki wrote:
2010/11/10 Dominic Evansoldmanuk@gmail.com:
On 10/11/10 09:09, Teemu Suikki wrote:
Why doesn't it match? The descriptions are 100% identical.
Check your search timer's configuration for comparing 'sub-title' when avoiding repeats. Compare subtitle should be set to either 'No' or 'If present', otherwise the comparison will also return false if your EPG doesn't contain a subtitle for the entry.
Hey, that was it! Thanks a bunch. :)
No problem :-)
Tbh I'm not sure why the 'Yes' option is available as a choice. Why would you ever want to go through this logic path?
// pseudo code, compare 'this' recording to 'other' recording for equality when searchtimer 'compare sub-title' option is set to 'yes' boolean equals(Recording other) { if (this.subtitle == null || other.subtitle == null) { return false; }
... }
Check your search timer's configuration for comparing 'sub-title' when avoiding repeats. Compare subtitle should be set to either 'No' or 'If present', otherwise the comparison will also return false if your EPG doesn't contain a subtitle for the entry.
Hey, that was it! Thanks a bunch. :)
No problem :-)
Tbh I'm not sure why the 'Yes' option is available as a choice. Why would you ever want to go through this logic path?
// pseudo code, compare 'this' recording to 'other' recording for equality when searchtimer 'compare sub-title' option is set to 'yes' boolean equals(Recording other) { if (this.subtitle == null || other.subtitle == null) { return false; }
Yeah, weird. What's more, VDRadmin only has yes/no choices there.. Could be that I don't have the latest version, though. Anyway it makes no sense to me to have separate "if present" and "yes" options. What's the point in comparing non-existent subtitles, especially if the comparison always fails?
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?
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 :-)
On 10/11/10 13:25, Dominic Evans wrote:
I don't think its a bug, it seems to be the intended function.
- 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).
2010/11/10 Dominic Evans oldmanuk@gmail.com:
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.
It would seem that "yes" and "if present" settings should be swapped? I'm pretty sure "yes" worked like "if present" earlier, because my timers worked just fine before upgrading..
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;...
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.
- 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@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
Hi Christian,
On 10 November 2010 22:20, Christian Wieninger cwieninger@gmx.de wrote:
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.
Thanks for the clarifications.
Do you plan to make the changes you mention, or do you need someone else to work on a patch?
Cheers, Dom
Hi Dom,
Am 11.11.2010 14:35, schrieb Dominic Evans:
Hi Christian,
On 10 November 2010 22:20, Christian Wieningercwieninger@gmx.de wrote:
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.
Thanks for the clarifications.
Do you plan to make the changes you mention, or do you need someone else to work on a patch?
Well, yes - I will change this as soon as possible, but help is always appreciated because unfortunately spare time is always far too little ;)
Cheers, Christian
Cheers, Dom
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr