1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-27 23:59:59 +02:00

Fixed issue #968

This commit is contained in:
Dominik Sitar
2018-11-13 12:49:08 +01:00
parent de773db4f4
commit ffe31e90b7
3 changed files with 17 additions and 1 deletions

View File

@@ -563,6 +563,10 @@ public abstract class AbstractRipper
LOGGER.error("Got exception while running ripper:", e);
waitForThreads();
sendUpdate(STATUS.RIP_ERRORED, "HTTP status code " + e.getStatusCode() + " for URL " + e.getUrl());
}catch(NullPointerException e){
LOGGER.error("Got null pointer exception while running ripper:", e);
waitForThreads();
sendUpdate(STATUS.NO_ALBUM_OR_USER, "Album or user doesn't exist!");
} catch (Exception e) {
LOGGER.error("Got exception while running ripper:", e);
waitForThreads();

View File

@@ -1404,6 +1404,17 @@ public final class MainWindow implements Runnable, RipStatusHandler {
case TOTAL_BYTES:
// Update total bytes
break;
case NO_ALBUM_OR_USER:
if (LOGGER.isEnabledFor(Level.ERROR)) {
appendLog((String) msg.getObject(), Color.RED);
}
stopButton.setEnabled(false);
statusProgress.setValue(0);
statusProgress.setVisible(false);
openButton.setVisible(false);
pack();
statusWithColor("Error: " + msg.getObject(), Color.RED);
break;
}
}

View File

@@ -15,7 +15,8 @@ public class RipStatusMessage {
DOWNLOAD_WARN("Download problem"),
TOTAL_BYTES("Total bytes"),
COMPLETED_BYTES("Completed bytes"),
RIP_ERRORED("Rip Errored");
RIP_ERRORED("Rip Errored"),
NO_ALBUM_OR_USER("No album or user");
String value;
STATUS(String value) {