From f9018f9feb9510bd24fb28d7d82882a0f519bc8a Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 24 Jun 2015 17:59:56 +0000 Subject: [PATCH] * fix movie match selection/repeat issue @see https://www.filebot.net/forums/viewtopic.php?f=6&p=15797#p15797 --- source/net/filebot/ui/rename/MovieHashMatcher.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/ui/rename/MovieHashMatcher.java b/source/net/filebot/ui/rename/MovieHashMatcher.java index 2a9deab2..d48bc81a 100644 --- a/source/net/filebot/ui/rename/MovieHashMatcher.java +++ b/source/net/filebot/ui/rename/MovieHashMatcher.java @@ -451,9 +451,10 @@ class MovieHashMatcher implements AutoCompleteMatcher { // allow only one select dialog at a time @SuppressWarnings("unchecked") Map selectionMemory = (Map) memory.get("selection"); + String selectionKey = fileQuery.length() >= 2 || folderQuery.length() <= 2 ? fileQuery : folderQuery; - if (selectionMemory.containsKey(fileQuery)) { - return selectionMemory.get(fileQuery); + if (selectionMemory.containsKey(selectionKey)) { + return selectionMemory.get(selectionKey); } // check auto-selection settings @@ -468,7 +469,7 @@ class MovieHashMatcher implements AutoCompleteMatcher { SwingUtilities.invokeAndWait(showSelectDialog); // cache selected value - selectionMemory.put(fileQuery, showSelectDialog.get()); + selectionMemory.put(selectionKey, showSelectDialog.get()); return showSelectDialog.get(); }