cleaning up some potential bugs
This commit is contained in:
parent
746dd3fdc9
commit
554026bfbe
@ -104,10 +104,7 @@ public class ImagefapRipper extends AlbumRipper {
|
||||
}
|
||||
|
||||
public boolean canRip(URL url) {
|
||||
if (!url.getHost().endsWith(DOMAIN)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return url.getHost().endsWith(DOMAIN);
|
||||
}
|
||||
|
||||
}
|
@ -245,9 +245,13 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static String filesystemSafe(String text) {
|
||||
return text.replaceAll("[^a-zA-Z0-9.-]", "_")
|
||||
text = text.replaceAll("[^a-zA-Z0-9.-]", "_")
|
||||
.replaceAll("__", "_")
|
||||
.replaceAll("_+$", "");
|
||||
if (text.length() > 255) {
|
||||
text = text.substring(0, 254);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
public static String bytesToHumanReadable(int bytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user