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(); }