Merge pull request #313 from cyian-1756/api-changes
Added hasASAPRipping(), which if returns true allows a ripper to not return anything from getURLsFromPage()
This commit is contained in:
commit
80e746adbb
@ -69,6 +69,7 @@ public abstract class AbstractHTMLRipper extends AlbumRipper {
|
|||||||
|
|
||||||
while (doc != null) {
|
while (doc != null) {
|
||||||
List<String> imageURLs = getURLsFromPage(doc);
|
List<String> imageURLs = getURLsFromPage(doc);
|
||||||
|
if (!hasASAPRipping()) {
|
||||||
// Remove all but 1 image
|
// Remove all but 1 image
|
||||||
if (isThisATest()) {
|
if (isThisATest()) {
|
||||||
while (imageURLs.size() > 1) {
|
while (imageURLs.size() > 1) {
|
||||||
@ -88,6 +89,7 @@ public abstract class AbstractHTMLRipper extends AlbumRipper {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (hasDescriptionSupport() && Utils.getConfigBoolean("descriptions.save", false)) {
|
if (hasDescriptionSupport() && Utils.getConfigBoolean("descriptions.save", false)) {
|
||||||
logger.debug("Fetching description(s) from " + doc.location());
|
logger.debug("Fetching description(s) from " + doc.location());
|
||||||
List<String> textURLs = getDescriptionsFromPage(doc);
|
List<String> textURLs = getDescriptionsFromPage(doc);
|
||||||
|
@ -43,6 +43,7 @@ public abstract class AbstractRipper
|
|||||||
public abstract void rip() throws IOException;
|
public abstract void rip() throws IOException;
|
||||||
public abstract String getHost();
|
public abstract String getHost();
|
||||||
public abstract String getGID(URL url) throws MalformedURLException;
|
public abstract String getGID(URL url) throws MalformedURLException;
|
||||||
|
public boolean hasASAPRipping() { return false; }
|
||||||
|
|
||||||
private boolean shouldStop = false;
|
private boolean shouldStop = false;
|
||||||
private boolean thisIsATest = false;
|
private boolean thisIsATest = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user