mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 18:32:39 +01:00
Add Komikindo (#3956)
This commit is contained in:
parent
26f9705b2d
commit
bb1a0ee103
10
src/id/komikindo/build.gradle
Normal file
10
src/id/komikindo/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
ext {
|
||||
extName = 'Komikindo'
|
||||
extClass = '.Komikindo'
|
||||
themePkg = 'mangathemesia'
|
||||
baseUrl = 'https://komikindo.sbs'
|
||||
overrideVersionCode = 0
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/id/komikindo/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/id/komikindo/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
src/id/komikindo/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/id/komikindo/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
src/id/komikindo/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/id/komikindo/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
src/id/komikindo/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/id/komikindo/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
src/id/komikindo/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/id/komikindo/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,43 @@
|
||||
package eu.kanade.tachiyomi.extension.id.komikindo
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
import org.jsoup.nodes.Document
|
||||
|
||||
class Komikindo : MangaThemesia(
|
||||
"Komikindo",
|
||||
"https://komikindo.sbs",
|
||||
"id",
|
||||
) {
|
||||
// Some covers fail to load with no Accept header + no resize parameter.
|
||||
// Hence the workarounds:
|
||||
|
||||
private val cdnHeaders = imageRequest(Page(0, "$baseUrl/", baseUrl)).headers
|
||||
|
||||
override val client = super.client.newBuilder()
|
||||
.addInterceptor { chain ->
|
||||
val request = chain.request()
|
||||
val url = request.url.toString()
|
||||
if (url.contains("/wp-content/uploads/")) {
|
||||
return@addInterceptor chain.proceed(request.newBuilder().headers(cdnHeaders).build())
|
||||
}
|
||||
chain.proceed(request)
|
||||
}
|
||||
.build()
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
return super.mangaDetailsParse(document).apply {
|
||||
thumbnail_url = thumbnail_url
|
||||
?.toHttpUrlOrNull()
|
||||
?.takeIf { it.queryParameter("resize") == null }
|
||||
?.newBuilder()
|
||||
?.setEncodedQueryParameter("resize", "165,225")
|
||||
?.build()
|
||||
?.toString()
|
||||
}
|
||||
}
|
||||
|
||||
override val hasProjectPage = true
|
||||
}
|
Loading…
Reference in New Issue
Block a user