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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -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;
|
||||
|
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user