[Manatoki] Fixed crashing

This commit is contained in:
tom5079
2021-12-27 12:33:57 +09:00
parent 850ac3ea83
commit 0e19d6c9b2
3 changed files with 27 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ suspend fun HttpClient.getItem(
}.toString()
val urls = Jsoup.parse(htmlData)
.select("img[^data-]:not([style])")
.select("img[^data-]:not([style]):not([^class])")
.map {
it.attributes()
.first { it.key.startsWith("data-") }

View File

@@ -123,7 +123,7 @@ class NetworkCache(context: Context) : DIAware {
requests[url] = networkScope.launch {
runCatching {
if (file.exists()) {
if (!force && file.exists()) {
progressFlow.emit(Float.POSITIVE_INFINITY)
} else {
cacheDir.mkdirs()