From 1da35a5f748e7a79659e7182ef344559423cc20c Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 23 Aug 2018 19:52:50 -0400 Subject: [PATCH] Cleaned up some code --- src/main/java/com/rarchives/ripme/ui/MainWindow.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ui/MainWindow.java b/src/main/java/com/rarchives/ripme/ui/MainWindow.java index bc2adbb5..b64ca0ca 100644 --- a/src/main/java/com/rarchives/ripme/ui/MainWindow.java +++ b/src/main/java/com/rarchives/ripme/ui/MainWindow.java @@ -1266,11 +1266,12 @@ public final class MainWindow implements Runnable, RipStatusHandler { int rangeStart = Integer.parseInt(rangeToParse.split("-")[0]); int rangeEnd = Integer.parseInt(rangeToParse.split("-")[1]); for (int i = rangeStart; i < rangeEnd +1; i++) { - if (canRip(url.replaceAll("\\{\\S*\\}", Integer.toString(i)))) { - queueListModel.add(queueListModel.size(), url.replaceAll("\\{\\S*\\}", Integer.toString(i))); + String realURL = url.replaceAll("\\{\\S*\\}", Integer.toString(i)); + if (canRip(realURL)) { + queueListModel.add(queueListModel.size(), realURL); ripTextfield.setText(""); } else { - LOGGER.error("Can't find ripper for " + url.replaceAll("\\{\\S*\\}", Integer.toString(i))); + LOGGER.error("Can't find ripper for " +realURL); } } }