|
|
|
@ -120,7 +120,7 @@ object BookHelp { |
|
|
|
|
val awaitList = arrayListOf<Deferred<Unit>>() |
|
|
|
|
content.split("\n").forEach { |
|
|
|
|
val matcher = AppPattern.imgPattern.matcher(it) |
|
|
|
|
if (matcher.find()) { |
|
|
|
|
while (matcher.find()) { |
|
|
|
|
matcher.group(1)?.let { src -> |
|
|
|
|
val mSrc = NetworkUtils.getAbsoluteURL(bookChapter.url, src) |
|
|
|
|
awaitList.add(async { |
|
|
|
@ -158,7 +158,8 @@ object BookHelp { |
|
|
|
|
).writeBytes(it) |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
AppLog.putDebug("${src}下载错误", e) |
|
|
|
|
e.printStackTrace() |
|
|
|
|
AppLog.put("${src}下载错误", e) |
|
|
|
|
} finally { |
|
|
|
|
downloadImages.remove(src) |
|
|
|
|
} |
|
|
|
|