diff --git a/source/net/sourceforge/filebot/media/MediaDetection.java b/source/net/sourceforge/filebot/media/MediaDetection.java index b11bcc1d..aa72faae 100644 --- a/source/net/sourceforge/filebot/media/MediaDetection.java +++ b/source/net/sourceforge/filebot/media/MediaDetection.java @@ -391,8 +391,14 @@ public class MediaDetection { public static List sortBySimilarity(Collection options, Collection terms) throws IOException { - SimilarityMetric metric = new MetricAvg(new SequenceMatchSimilarity(), new NameSimilarityMetric()); List paragon = stripReleaseInfo(terms, true); + SimilarityMetric metric = new MetricAvg(new SequenceMatchSimilarity(), new NameSimilarityMetric(), new NameSimilarityMetric() { + + @Override + protected String normalize(Object object) { + return super.normalize(stripReleaseInfo(object.toString()).replaceAll("\\D+", " ")); // similarity of number patterns + } + }); List sorted = new ArrayList(options); sort(sorted, new SimilarityComparator(metric, paragon.toArray())); @@ -537,11 +543,13 @@ public class MediaDetection { } - public static String stripReleaseInfo(String name) throws IOException { + public static String stripReleaseInfo(String name) { try { return releaseInfo.cleanRelease(singleton(name), true).iterator().next(); } catch (NoSuchElementException e) { return ""; // default value in case all tokens are stripped away + } catch (IOException e) { + throw new RuntimeException(e); } } diff --git a/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java b/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java index 42401743..fe7b1229 100644 --- a/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java +++ b/source/net/sourceforge/filebot/ui/rename/MovieHashMatcher.java @@ -318,7 +318,7 @@ class MovieHashMatcher implements AutoCompleteMatcher { // add repeat button JCheckBox checkBox = new JCheckBox(); - checkBox.setToolTipText("Auto-Repeat"); + checkBox.setToolTipText("Select / Ignore for all"); checkBox.setCursor(getPredefinedCursor(HAND_CURSOR)); checkBox.setIcon(ResourceManager.getIcon("button.repeat")); checkBox.setSelectedIcon(ResourceManager.getIcon("button.repeat.selected"));