summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--HISTORY.DE2
-rw-r--r--epgsearchtools.c8
3 files changed, 11 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index dec3005..01a274a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -51,6 +51,8 @@ fixes:
- 'avoid repeats' combined with 'pause on ... recordings' created to less timers, thanks
to spockele@vdrportal for reporting
- fixed some compiler warnings with g++ 4.3
+- fine-tuning fuzzy matching of descriptions, thanks to Alf Fahland for providing a patch
+
2007-09-02: Version 0.9.23
new:
diff --git a/HISTORY.DE b/HISTORY.DE
index 5fb1db0..9cf1b26 100644
--- a/HISTORY.DE
+++ b/HISTORY.DE
@@ -58,6 +58,8 @@ fixes:
- 'Wiederholung vermeiden' kombiniert mit 'Pause, wenn ... Aufnahmen existieren' hat
zu wenige Timer erzeugt, Danke an spockele@vdrportal für den Hinweis
- einige Compilerwarnungen von g++ 4.3 behoben
+- fine-tuning beim fuzzy-Vergleich von Inhaltsangaben, Danke an Alf Fahland für einen
+ Patch
2007-09-02: Version 0.9.23
diff --git a/epgsearchtools.c b/epgsearchtools.c
index 0e9cf65..0ee4486 100644
--- a/epgsearchtools.c
+++ b/epgsearchtools.c
@@ -686,7 +686,13 @@ bool DescriptionMatches(const char* eDescr, const char* rDescr)
// last try with Levenshtein Distance, only compare the first 1000 chars
double fMatch = FuzzyMatch(eDescr, rDescr, 1000);
- if (fMatch > MATCHLIMIT)
+ double tmp_matchlimit = MATCHLIMIT;
+ if(maxLength - minLength < 5)
+ {
+ tmp_matchlimit = 0.95;
+ LogFile.Log(2,"difference between both descriptions is < 5 setting matchlimit to: %.2f %%", tmp_matchlimit*100);
+ }
+ if (fMatch > tmp_matchlimit)
{
LogFile.Log(2,"match is: %.2f %%", fMatch*100);
return true;