diff --git a/source/net/filebot/cli/CmdlineOperationsTextUI.java b/source/net/filebot/cli/CmdlineOperationsTextUI.java index 082ac616..0d7f99ed 100644 --- a/source/net/filebot/cli/CmdlineOperationsTextUI.java +++ b/source/net/filebot/cli/CmdlineOperationsTextUI.java @@ -64,6 +64,11 @@ public class CmdlineOperationsTextUI extends CmdlineOperations { @Override public List renameAll(Map renameMap, RenameAction renameAction, ConflictAction conflictAction, List> matches) throws Exception { + // default behavior if rename map is empty + if (renameMap.isEmpty()) { + return super.renameAll(renameMap, renameAction, conflictAction, matches); + } + // manually confirm each file mapping Map selection = onScreen(() -> confirmRenameMap(renameMap, renameAction, conflictAction)); @@ -74,12 +79,11 @@ public class CmdlineOperationsTextUI extends CmdlineOperations { protected List selectSearchResult(String query, Collection options, boolean alias, boolean strict) throws Exception { List matches = getProbableMatches(query, options, alias, false); - // manually select option if there is more than one - if (matches.size() > 1) { - return onScreen(() -> confirmSearchResult(query, matches)); + if (matches.size() < 2) { + return matches; } - return matches; + return onScreen(() -> confirmSearchResult(query, matches)); // manually select option if there is more than one } protected List confirmSearchResult(String query, List options) {