Fix Manhuagui not loading in preview builds
Fixes https://github.com/tachiyomiorg/tachiyomi/issues/9915
This commit is contained in:
parent
f916f46a60
commit
3a409ba93a
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'ManHuaGui'
|
extName = 'ManHuaGui'
|
||||||
pkgNameSuffix = 'zh.manhuagui'
|
pkgNameSuffix = 'zh.manhuagui'
|
||||||
extClass = '.Manhuagui'
|
extClass = '.Manhuagui'
|
||||||
extVersionCode = 16
|
extVersionCode = 17
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -43,14 +43,15 @@ import java.io.IOException
|
|||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
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 {
|
private val preferences: SharedPreferences by lazy {
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val name = "漫画柜"
|
|
||||||
|
|
||||||
private val baseHost = if (preferences.getBoolean(USE_MIRROR_URL_PREF, false)) {
|
private val baseHost = if (preferences.getBoolean(USE_MIRROR_URL_PREF, false)) {
|
||||||
"mhgui.com"
|
"mhgui.com"
|
||||||
} else {
|
} else {
|
||||||
@ -63,7 +64,6 @@ class Manhuagui : ConfigurableSource, ParsedHttpSource() {
|
|||||||
} else {
|
} else {
|
||||||
"https://www.$baseHost"
|
"https://www.$baseHost"
|
||||||
}
|
}
|
||||||
override val lang = "zh"
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
private val imageServer = arrayOf("https://i.hamreus.com", "https://cf.hamreus.com")
|
private val imageServer = arrayOf("https://i.hamreus.com", "https://cf.hamreus.com")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user