1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-09-02 02:12:45 +02:00

UI does not freeze during rip, moved to JRE-1.6

This commit is contained in:
4pr0n
2014-03-01 02:43:47 -08:00
parent 07c73701db
commit af9f5ce272
5 changed files with 22 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ import com.rarchives.ripme.utils.Utils;
public abstract class AbstractRipper
extends Observable
implements RipperInterface {
implements RipperInterface, Runnable {
private static final Logger logger = Logger.getLogger(AbstractRipper.class);
@@ -221,4 +221,11 @@ public abstract class AbstractRipper
}
}
public void run() {
try {
rip();
} catch (IOException e) {
logger.error("Got exception while running ripper:", e);
}
}
}

View File

@@ -63,7 +63,8 @@ public class MainWindow implements Runnable {
URL url = new URL(ripTextfield.getText());
AbstractRipper ripper = AbstractRipper.getRipper(url);
ripper.setObserver(new RipStatusHandler());
ripper.rip();
Thread t = new Thread(ripper);
t.start();
} catch (Exception e) {
status("Error: " + e.getMessage());
return;

View File

@@ -5,7 +5,7 @@ public class RipStatusMessage {
public enum STATUS {
LOADING_RESOURCE("Loading Resource"),
DOWNLOAD_STARTED("Download Started"),
DOWNLOAD_COMPLETE("Download Domplete"),
DOWNLOAD_COMPLETE("Download Complete"),
DOWNLOAD_ERRORED("Download Errored"),
RIP_COMPLETE("Rip Complete");