Add AniglisNovels and fix Keyoapp thumbnail quality (#6939)
Add AniglisNovels
This commit is contained in:
parent
df2a548325
commit
b1f2459ddc
|
@ -2,7 +2,7 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 9
|
baseVersionCode = 10
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":lib:i18n"))
|
api(project(":lib:i18n"))
|
||||||
|
|
|
@ -18,6 +18,7 @@ import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
|
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
@ -308,6 +309,12 @@ abstract class Keyoapp(
|
||||||
protected open fun Element.getImageUrl(selector: String): String? {
|
protected open fun Element.getImageUrl(selector: String): String? {
|
||||||
return this.selectFirst(selector)?.let { element ->
|
return this.selectFirst(selector)?.let { element ->
|
||||||
IMG_REGEX.find(element.attr("style"))?.groups?.get("url")?.value
|
IMG_REGEX.find(element.attr("style"))?.groups?.get("url")?.value
|
||||||
|
?.toHttpUrlOrNull()?.let {
|
||||||
|
it.newBuilder()
|
||||||
|
.setQueryParameter("w", "480") // Keyoapp returns the dynamic size of the thumbnail to any size
|
||||||
|
.build()
|
||||||
|
.toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
ext {
|
||||||
|
extName = 'Aniglis Novels'
|
||||||
|
extClass = '.AniglisNovels'
|
||||||
|
themePkg = 'keyoapp'
|
||||||
|
baseUrl = 'https://agsnovels.com'
|
||||||
|
overrideVersionCode = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: "$rootDir/common.gradle"
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -0,0 +1,9 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.en.aniglisnovels
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.multisrc.keyoapp.Keyoapp
|
||||||
|
|
||||||
|
class AniglisNovels : Keyoapp(
|
||||||
|
"Aniglis Novels",
|
||||||
|
"https://agsnovels.com",
|
||||||
|
"en",
|
||||||
|
)
|
Loading…
Reference in New Issue