[Patch] MangaBox - Change CDN (#1846)
* Update build.gradle * Bypass convert_image_digi
This commit is contained in:
parent
1e041cd669
commit
c0dd822261
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: MangaBox (Mangakakalot and others)'
|
appName = 'Tachiyomi: MangaBox (Mangakakalot and others)'
|
||||||
pkgNameSuffix = 'all.mangabox'
|
pkgNameSuffix = 'all.mangabox'
|
||||||
extClass = '.MangaBoxFactory'
|
extClass = '.MangaBoxFactory'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,11 +218,20 @@ abstract class MangaBox (
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
|
|
||||||
document.select(pageListSelector).forEach {
|
document.select(pageListSelector).forEach {
|
||||||
pages.add(Page(pages.size, "", it.attr("abs:src")))
|
pages.add(Page(pages.size, "", changecdn(it.attr("abs:src"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun changecdn(url: String): String {
|
||||||
|
if (url.startsWith("https://convert_image_digi.mgicdn.com")) {
|
||||||
|
val newurl = "https://images.weserv.nl/?url=" + url.removePrefix("https://")
|
||||||
|
return newurl
|
||||||
|
} else {
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("No used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("No used")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue