diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 97d72d10..d4915b42 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -5,6 +5,7 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.6 diff --git a/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java b/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java index 9271230c..35b2aa43 100644 --- a/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/AbstractHTMLRipper.java @@ -88,7 +88,7 @@ public abstract class AbstractHTMLRipper extends AlbumRipper { break; } } - if (hasDescriptionSupport()) { + if (hasDescriptionSupport() && Utils.getConfigBoolean("descriptions.save", false)) { logger.debug("Fetching description(s) from " + doc.location()); List textURLs = getDescriptionsFromPage(doc); if (textURLs.size() > 0) { diff --git a/src/main/java/com/rarchives/ripme/ui/MainWindow.java b/src/main/java/com/rarchives/ripme/ui/MainWindow.java index 89677745..7b82137e 100644 --- a/src/main/java/com/rarchives/ripme/ui/MainWindow.java +++ b/src/main/java/com/rarchives/ripme/ui/MainWindow.java @@ -136,6 +136,7 @@ public class MainWindow implements Runnable, RipStatusHandler { private static JCheckBox configSaveURLsOnly; private static JCheckBox configSaveAlbumTitles; private static JCheckBox configClipboardAutorip; + private static JCheckBox configSaveDescriptions; private static TrayIcon trayIcon; private static MenuItem trayMenuMain; @@ -208,6 +209,7 @@ public class MainWindow implements Runnable, RipStatusHandler { Utils.setConfigBoolean("urls_only.save", configSaveURLsOnly.isSelected()); Utils.setConfigBoolean("album_titles.save", configSaveAlbumTitles.isSelected()); Utils.setConfigBoolean("clipboard.autorip", configClipboardAutorip.isSelected()); + Utils.setConfigBoolean("descriptions.save", configSaveDescriptions.isSelected()); saveHistory(); Utils.saveConfig(); } @@ -457,6 +459,9 @@ public class MainWindow implements Runnable, RipStatusHandler { configClipboardAutorip = new JCheckBox("Autorip from Clipboard", Utils.getConfigBoolean("clipboard.autorip", false)); configClipboardAutorip.setHorizontalAlignment(JCheckBox.RIGHT); configClipboardAutorip.setHorizontalTextPosition(JCheckBox.LEFT); + configSaveDescriptions = new JCheckBox("Save descriptions", Utils.getConfigBoolean("descriptions.save", true)); + configSaveDescriptions.setHorizontalAlignment(JCheckBox.RIGHT); + configSaveDescriptions.setHorizontalTextPosition(JCheckBox.LEFT); configSaveDirLabel = new JLabel(); try { String workingDir = (Utils.shortenPath(Utils.getWorkingDirectory())); @@ -483,7 +488,8 @@ public class MainWindow implements Runnable, RipStatusHandler { gbc.gridx = 1; configurationPanel.add(configSaveURLsOnly, gbc); gbc.gridy = 8; gbc.gridx = 0; configurationPanel.add(configClipboardAutorip, gbc); gbc.gridx = 1; configurationPanel.add(configSaveAlbumTitles, gbc); - gbc.gridy = 9; gbc.gridx = 0; configurationPanel.add(configSaveDirLabel, gbc); + gbc.gridy = 9; gbc.gridx = 0; configurationPanel.add(configSaveDescriptions, gbc); + gbc.gridy =10; gbc.gridx = 0; configurationPanel.add(configSaveDirLabel, gbc); gbc.gridx = 1; configurationPanel.add(configSaveDirButton, gbc); gbc.gridy = 0; pane.add(ripPanel, gbc); @@ -737,6 +743,13 @@ public class MainWindow implements Runnable, RipStatusHandler { Utils.configureLogger(); } }); + configSaveDescriptions.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent arg0) { + Utils.setConfigBoolean("descriptions.save", configSaveDescriptions.isSelected()); + Utils.configureLogger(); + } + }); queueListModel.addListDataListener(new ListDataListener() { @Override public void intervalAdded(ListDataEvent arg0) {