[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)'
|
||||
pkgNameSuffix = 'all.mangabox'
|
||||
extClass = '.MangaBoxFactory'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -218,11 +218,20 @@ abstract class MangaBox (
|
|||
val pages = mutableListOf<Page>()
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue