diff --git a/source/net/filebot/ui/rename/RenameAction.java b/source/net/filebot/ui/rename/RenameAction.java index 1ae402ec..16fa4ad6 100644 --- a/source/net/filebot/ui/rename/RenameAction.java +++ b/source/net/filebot/ui/rename/RenameAction.java @@ -72,9 +72,15 @@ class RenameAction extends AbstractAction { Window window = getWindow(evt.getSource()); withWaitCursor(window, () -> { - Map renameMap = validate(model.getRenameMap(), window); + // prepare rename map (abort and notify the user if background computation is still in progress) + Map renameMap = null; + try { + renameMap = validate(model.getRenameMap(), window); + } catch (Exception e) { + log.log(Level.WARNING, e::getMessage); + } - if (renameMap.isEmpty()) { + if (renameMap == null || renameMap.isEmpty()) { return; } diff --git a/source/net/filebot/ui/rename/RenameModel.java b/source/net/filebot/ui/rename/RenameModel.java index 8d38bade..a7f4bf6b 100644 --- a/source/net/filebot/ui/rename/RenameModel.java +++ b/source/net/filebot/ui/rename/RenameModel.java @@ -92,7 +92,7 @@ public class RenameModel extends MatchModel { } catch (ExecutionException e) { throw new IllegalStateException(String.format("\"%s\" could not be formatted: %s.", task.preview(), e.getCause().getMessage())); } catch (TimeoutException e) { - throw new IllegalStateException(String.format("\"%s\" has not been formatted yet.", task.preview())); + throw new IllegalStateException(String.format("\"%s\" has not been formatted yet. Applying custom formats may take a while.", task.preview())); } catch (InterruptedException e) { throw new RuntimeException(e); }