HNI-Scantrad move to PizzaReader (#2267)
This commit is contained in:
parent
8bbc841b7d
commit
ef36432ffc
|
@ -1,9 +1,9 @@
|
|||
ext {
|
||||
extName = 'HNI-Scantrad'
|
||||
extClass = '.HNIScantradFactory'
|
||||
themePkg = 'foolslide'
|
||||
baseUrl = 'https://hni-scantrad.com'
|
||||
overrideVersionCode = 1
|
||||
extClass = '.HNIScantrad'
|
||||
themePkg = 'pizzareader'
|
||||
baseUrl = 'https://hni-scantrad.net'
|
||||
overrideVersionCode = 5
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package eu.kanade.tachiyomi.extension.all.hniscantrad
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.pizzareader.PizzaReader
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
class HNIScantrad : PizzaReader("HNI-Scantrad", "https://hni-scantrad.net", "all") {
|
||||
override val json = Json {
|
||||
ignoreUnknownKeys = true
|
||||
coerceInputValues = true
|
||||
}
|
||||
|
||||
override fun String.toStatus(): Int {
|
||||
return if (isEmpty()) {
|
||||
SManga.UNKNOWN
|
||||
} else {
|
||||
when (substring(0, 7)) {
|
||||
"In cors" -> SManga.ONGOING
|
||||
"On goin" -> SManga.ONGOING
|
||||
"Complet" -> SManga.COMPLETED
|
||||
"Conclus" -> SManga.COMPLETED
|
||||
"Conclud" -> SManga.COMPLETED
|
||||
"Licenzi" -> SManga.LICENSED
|
||||
"License" -> SManga.LICENSED
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.all.hniscantrad
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.foolslide.FoolSlide
|
||||
import eu.kanade.tachiyomi.source.SourceFactory
|
||||
import okhttp3.Response
|
||||
|
||||
class HNIScantradFactory : SourceFactory {
|
||||
override fun createSources() = listOf(HNIScantradFR(), HNIScantradEN())
|
||||
}
|
||||
|
||||
class HNIScantradFR : FoolSlide("HNI-Scantrad", "https://hni-scantrad.com", "fr", "/lel") {
|
||||
override fun chapterListParse(response: Response) =
|
||||
super.chapterListParse(response).filter { "/fr/" in it.url }
|
||||
}
|
||||
|
||||
class HNIScantradEN : FoolSlide("HNI-Scantrad", "https://hni-scantrad.com", "en", "/lel") {
|
||||
override fun chapterListParse(response: Response) =
|
||||
super.chapterListParse(response).filter { "/en-us/" in it.url }
|
||||
}
|
Loading…
Reference in New Issue