mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-29 16:50:10 +02:00
cleaning up some potential bugs
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user