1.0.19 - Fix for imgur account ripper. Closes #19

This commit is contained in:
4pr0n 2014-04-19 11:13:56 -07:00
parent 8db6e2a11b
commit fce0ecd8bf
3 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.rarchives.ripme</groupId> <groupId>com.rarchives.ripme</groupId>
<artifactId>ripme</artifactId> <artifactId>ripme</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0.18</version> <version>1.0.19</version>
<name>ripme</name> <name>ripme</name>
<url>http://rip.rarchives.com</url> <url>http://rip.rarchives.com</url>
<properties> <properties>

View File

@ -111,6 +111,10 @@ public class ImgurRipper extends AbstractRipper {
if (!saveAs.endsWith(File.separator)) { if (!saveAs.endsWith(File.separator)) {
saveAs += File.separator; saveAs += File.separator;
} }
File subdirFile = new File(saveAs);
if (!subdirFile.exists()) {
subdirFile.mkdirs();
}
index += 1; index += 1;
saveAs += String.format("%03d_%s", index, imgurImage.getSaveAs()); saveAs += String.format("%03d_%s", index, imgurImage.getSaveAs());
addURLToDownload(imgurImage.url, new File(saveAs)); addURLToDownload(imgurImage.url, new File(saveAs));

View File

@ -19,7 +19,7 @@ import org.jsoup.nodes.Document;
public class UpdateUtils { public class UpdateUtils {
private static final Logger logger = Logger.getLogger(UpdateUtils.class); private static final Logger logger = Logger.getLogger(UpdateUtils.class);
private static final String DEFAULT_VERSION = "1.0.18"; private static final String DEFAULT_VERSION = "1.0.19";
private static final String updateJsonURL = "http://rarchives.com/ripme.json"; private static final String updateJsonURL = "http://rarchives.com/ripme.json";
private static final String updateJarURL = "http://rarchives.com/ripme.jar"; private static final String updateJarURL = "http://rarchives.com/ripme.jar";
private static final String mainFileName = "ripme.jar"; private static final String mainFileName = "ripme.jar";