Opened 12 years ago
Closed 10 years ago
Last modified 10 years ago
#11088 closed Patch - Bug Fix (fixed)
nearestName is case sensitive and too restrictive.
Reported by: | Owned by: | Karl Egly | |
---|---|---|---|
Priority: | trivial | Milestone: | 0.27.1 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Not sure why it was comparing the first char of both strings, also think it shouldn't be case sensitive at all.
diff --git a/mythtv/libs/libmythmetadata/metadatacommon.cpp b/mythtv/libs/libmythmetadata/metadatacommon.cpp index 8a5d29f..6cc1b36 100644 --- a/mythtv/libs/libmythmetadata/metadatacommon.cpp +++ b/mythtv/libs/libmythmetadata/metadatacommon.cpp @@ -1374,9 +1374,8 @@ QString nearestName(const QString& actual, const QStringList& candidates) QStringList::ConstIterator i = candidates.begin(); while ( i != candidates.end() ) { - if ( (*i)[0] == actual[0] ) - { - int delta = editDistance( actual, *i ); + QString candidate = *i; + int delta = editDistance( actual.toLower(), candidate.toLower() ); if ( delta < deltaBest ) { deltaBest = delta; @@ -1387,7 +1386,6 @@ QString nearestName(const QString& actual, const QStringList& candidates) { numBest++; } - } ++i; }
Change History (4)
comment:1 Changed 11 years ago by
Milestone: | unknown → 0.27 |
---|---|
Type: | Bug Report - General → Patch - Bug Fix |
comment:2 Changed 10 years ago by
Owner: | set to Karl Dietz <dekarl@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 Changed 10 years ago by
Milestone: | 0.27 → 0.27.1 |
---|---|
Owner: | changed from Karl Dietz <dekarl@…> to Karl Egly |
Note: See
TracTickets for help on using
tickets.
In 18f6412f73cffc751931dc688d57ea3d7708c7f1/mythtv: