diff --git a/source/net/sourceforge/filebot/cli/CmdlineOperations.java b/source/net/sourceforge/filebot/cli/CmdlineOperations.java index d65f250e..a0143fea 100644 --- a/source/net/sourceforge/filebot/cli/CmdlineOperations.java +++ b/source/net/sourceforge/filebot/cli/CmdlineOperations.java @@ -771,10 +771,15 @@ public class CmdlineOperations implements CmdlineInterface { } - public List selectSearchResult(String query, Iterable searchResults, boolean strict) throws Exception { + public List selectSearchResult(String query, Collection searchResults, boolean strict) throws Exception { List probableMatches = findProbableMatches(query, searchResults, strict); if (probableMatches.isEmpty() || (strict && probableMatches.size() != 1)) { + // allow single search results to just pass through in non-strict mode even if match confidence is low + if (searchResults.size() == 1 && !strict) { + return new ArrayList(searchResults); + } + throw new Exception("Failed to auto-select search result: " + searchResults); }