* make sure important tokens are not normalized away

This commit is contained in:
Reinhard Pointner 2011-11-21 14:51:19 +00:00
parent 3436eac471
commit a6338bc430
1 changed files with 3 additions and 3 deletions

View File

@ -5,6 +5,7 @@ package net.sourceforge.filebot.ui.rename;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.sourceforge.filebot.hash.VerificationUtilities.*;
import static net.sourceforge.tuned.FileUtilities.*;
import java.io.File;
@ -238,9 +239,8 @@ public enum MatchSimilarityMetric implements SimilarityMetric {
name = getNameWithoutExtension(((AbstractFile) object).getName());
}
// remove group names and checksums, any [...] or (...)
name = name.replaceAll("\\([^\\(]*\\)", "");
name = name.replaceAll("\\[[^\\[]*\\]", "");
// remove checksums, any [...] or (...)
name = removeEmbeddedChecksum(name);
// remove/normalize special characters
name = name.replaceAll("['`´]+", "");