1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 07:14:38 +02:00

Added better solution to issue #968

This commit is contained in:
Dominik Sitar
2018-11-27 12:41:44 +01:00
parent c487fe2696
commit 27efe06a32
2 changed files with 4 additions and 4 deletions

View File

@@ -563,10 +563,6 @@ 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

@@ -171,6 +171,10 @@ public class TumblrRipper extends AlbumRipper {
HttpStatusException status = (HttpStatusException)cause;
if (status.getStatusCode() == HttpURLConnection.HTTP_UNAUTHORIZED && !useDefaultApiKey) {
retry = true;
} else if (status.getStatusCode() == 404) {
LOGGER.error("No user or album found!");
sendUpdate(STATUS.NO_ALBUM_OR_USER, "Album or user doesn't exist!");
break;
} else if (status.getStatusCode() == 429) {
LOGGER.error("Tumblr rate limit has been exceeded");
sendUpdate(STATUS.DOWNLOAD_ERRORED,"Tumblr rate limit has been exceeded");