From 2841ea9552a3a0e478226f52e70dd6f32bdaab26 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 9 Jul 2014 13:20:40 +0000 Subject: [PATCH] * make sure to not just reasonable results, that one results is probably better than no result --- source/net/filebot/ui/rename/MovieHashMatcher.java | 9 +++++---- website/data/query-blacklist.txt | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/ui/rename/MovieHashMatcher.java b/source/net/filebot/ui/rename/MovieHashMatcher.java index a1e754ba..a9e5388f 100644 --- a/source/net/filebot/ui/rename/MovieHashMatcher.java +++ b/source/net/filebot/ui/rename/MovieHashMatcher.java @@ -307,6 +307,11 @@ class MovieHashMatcher implements AutoCompleteMatcher { } protected Movie selectMovie(final File movieFile, final String userQuery, final Collection options, final Map memory, final Component parent) throws Exception { + // just auto-pick singleton results + if (options.size() == 1) { + return options.iterator().next(); + } + // 1. movie by filename final String fileQuery = (userQuery != null) ? userQuery : checkedStripReleaseInfo(movieFile); @@ -319,10 +324,6 @@ class MovieHashMatcher implements AutoCompleteMatcher { return null; } - if (options.size() == 1) { - return options.iterator().next(); - } - // auto-select perfect match for (Movie movie : options) { String movieIdentifier = normalizePunctuation(movie.toString()).toLowerCase(); diff --git a/website/data/query-blacklist.txt b/website/data/query-blacklist.txt index b317d40a..79e919e1 100644 --- a/website/data/query-blacklist.txt +++ b/website/data/query-blacklist.txt @@ -54,6 +54,7 @@ ^Download$ ^Downloading$ ^Downloads$ +^Drama$ ^Dropbox$ ^emule$ ^Entertainment$