Remove PPHanman (#14236)
This commit is contained in:
parent
0a9555c292
commit
10659ee9a5
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
@ -1,44 +0,0 @@
|
||||
package eu.kanade.tachiyomi.extension.zh.pphanman
|
||||
|
||||
import android.app.Application
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.multisrc.mccms.MCCMS
|
||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
// it has a category page with no filter
|
||||
class PPHanman : MCCMS("PP韩漫", "", hasCategoryPage = false), ConfigurableSource {
|
||||
|
||||
override val baseUrl: String
|
||||
|
||||
init {
|
||||
val mirrors = MIRRORS
|
||||
val mirrorIndex = Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||
.getString(MIRROR_PREF, "0")!!.toInt().coerceAtMost(mirrors.size - 1)
|
||||
baseUrl = "https://" + mirrors[mirrorIndex]
|
||||
}
|
||||
|
||||
// .../comic_{id}.html
|
||||
override fun getMangaId(url: String) = url.substringAfterLast('_').substringBeforeLast('.')
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||
ListPreference(screen.context).apply {
|
||||
val mirrors = MIRRORS
|
||||
key = MIRROR_PREF
|
||||
title = "镜像站点"
|
||||
summary = "%s\n重启生效"
|
||||
entries = mirrors
|
||||
entryValues = Array(mirrors.size) { it.toString() }
|
||||
setDefaultValue("0")
|
||||
}.let(screen::addPreference)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val MIRROR_PREF = "MIRROR"
|
||||
|
||||
// https://bitbucket.org/fabuye/pphanman
|
||||
private val MIRRORS get() = arrayOf("pphm.xyz", "pphm2.xyz", "krhentai.com")
|
||||
}
|
||||
}
|
@ -24,10 +24,6 @@ class MCCMSGenerator : ThemeSourceGenerator {
|
||||
name = "Pupu Manhua", baseUrl = "https://app.manhuaorg.com", lang = "zh",
|
||||
className = "Manhuaorg", sourceName = "朴朴漫画", overrideVersionCode = 2
|
||||
),
|
||||
SingleLang(
|
||||
name = "PPHanman", baseUrl = "https://pphm.xyz", lang = "zh", isNsfw = true,
|
||||
className = "PPHanman", sourceName = "PP韩漫", overrideVersionCode = 0
|
||||
),
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
Loading…
x
Reference in New Issue
Block a user