Fix Manhuagui not loading in preview builds

Fixes https://github.com/tachiyomiorg/tachiyomi/issues/9915
This commit is contained in:
arkon 2023-09-08 22:26:33 -04:00
parent f916f46a60
commit 3a409ba93a
2 changed files with 5 additions and 5 deletions
src/zh/manhuagui
build.gradle
src/eu/kanade/tachiyomi/extension/zh/manhuagui

@ -6,7 +6,7 @@ ext {
extName = 'ManHuaGui'
pkgNameSuffix = 'zh.manhuagui'
extClass = '.Manhuagui'
extVersionCode = 16
extVersionCode = 17
}
apply from: "$rootDir/common.gradle"

@ -43,14 +43,15 @@ import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Locale
class Manhuagui : ConfigurableSource, ParsedHttpSource() {
class Manhuagui(
override val name: String = "漫画柜",
override val lang: String = "zh",
) : ConfigurableSource, ParsedHttpSource() {
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
}
override val name = "漫画柜"
private val baseHost = if (preferences.getBoolean(USE_MIRROR_URL_PREF, false)) {
"mhgui.com"
} else {
@ -63,7 +64,6 @@ class Manhuagui : ConfigurableSource, ParsedHttpSource() {
} else {
"https://www.$baseHost"
}
override val lang = "zh"
override val supportsLatest = true
private val imageServer = arrayOf("https://i.hamreus.com", "https://cf.hamreus.com")