Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make metadata title matching more permissive

From the ticket: Not sure why it was comparing the first char of both
strings, also think it shouldn't be case sensitive at all.

I think so, too

Fixes #11088
Patch by Daniel Ribeiro
  • Loading branch information...
commit 18f6412f73cffc751931dc688d57ea3d7708c7f1 1 parent e6245ca
@dekarl dekarl authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 mythtv/libs/libmythmetadata/metadatacommon.cpp
View
6 mythtv/libs/libmythmetadata/metadatacommon.cpp
@@ -1439,9 +1439,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;
@@ -1452,7 +1451,6 @@ QString nearestName(const QString& actual, const QStringList& candidates)
{
numBest++;
}
- }
++i;
}
Please sign in to comment.
Something went wrong with that request. Please try again.