Fix an error with empty pages from downloaded chapters (images not found)

This commit is contained in:
inorichi 2016-01-19 19:30:55 +01:00
parent 4bf15a5a2c
commit 111ec5541f

View File

@ -268,7 +268,7 @@ public class DownloadManager {
// Get the filename for an image given the page
private String getImageFilename(Page page) {
String url = page.getImageUrl();
return Uri.parse(url).getLastPathSegment();
return Uri.parse(url).getLastPathSegment().replaceAll("[^\\sa-zA-Z0-9.-]", "_");
}
private boolean isImageDownloaded(File imagePath) {