From 522b813587e834397a57c40f3765f6e995c5f6e4 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Sat, 23 Apr 2016 21:04:16 -0700 Subject: [PATCH] 1.2.13 - Luke-warm fix for imgur albums/images without descriptions Closes #324 --- pom.xml | 2 +- .../rarchives/ripme/ripper/rippers/ImgurRipper.java | 11 +++++++++-- src/main/java/com/rarchives/ripme/ui/UpdateUtils.java | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 41d404bf..244f36c8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.2.12 + 1.2.13 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java index 9ec0866c..89dd5341 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImgurRipper.java @@ -225,9 +225,16 @@ public class ImgurRipper extends AlbumRipper { "http://i.imgur.com/" + image.get("hash") + ext); + String title = null, description = null; + if (image.has("title") && !image.isNull("title")) { + title = image.getString("title"); + } + if (image.has("description") && !image.isNull("description")) { + description = image.getString("description"); + } ImgurImage imgurImage = new ImgurImage(imageURL, - image.getString("title"), - image.getString("description")); + title, + description); imgurAlbum.addImage(imgurImage); } return imgurAlbum; diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index 9d417b3a..3bd48127 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -21,7 +21,7 @@ import com.rarchives.ripme.utils.Utils; public class UpdateUtils { private static final Logger logger = Logger.getLogger(UpdateUtils.class); - private static final String DEFAULT_VERSION = "1.2.12"; + private static final String DEFAULT_VERSION = "1.2.13"; private static final String updateJsonURL = "http://rarchives.com/ripme.json"; private static final String updateJarURL = "http://rarchives.com/ripme.jar"; private static final String mainFileName = "ripme.jar";