Remove lang hijacks on Hitomi and NHentai

This commit is contained in:
Jobobby04 2022-01-22 12:22:32 -05:00
parent 87afe3191b
commit 7c8c6c4303
2 changed files with 2 additions and 18 deletions

View File

@ -29,7 +29,7 @@ class Hitomi(delegate: HttpSource, val context: Context) :
UrlImportableSource, UrlImportableSource,
NamespaceSource { NamespaceSource {
override val metaClass = HitomiSearchMetadata::class override val metaClass = HitomiSearchMetadata::class
override val lang = if (id == otherId) "all" else delegate.lang override val lang = delegate.lang
// Support direct URL importing // Support direct URL importing
override fun fetchSearchManga(page: Int, query: String, filters: FilterList) = override fun fetchSearchManga(page: Int, query: String, filters: FilterList) =
@ -122,14 +122,6 @@ class Hitomi(delegate: HttpSource, val context: Context) :
} }
} }
override fun toString() = "$name (${lang.uppercase()})"
override fun ensureDelegateCompatible() {
if (versionId != delegate.versionId) {
throw IncompatibleDelegateException("Delegate source is not compatible (versionId: $versionId <=> ${delegate.versionId})!")
}
}
override val matchingHosts = listOf( override val matchingHosts = listOf(
"hitomi.la" "hitomi.la"
) )

View File

@ -31,7 +31,7 @@ class NHentai(delegate: HttpSource, val context: Context) :
UrlImportableSource, UrlImportableSource,
NamespaceSource { NamespaceSource {
override val metaClass = NHentaiSearchMetadata::class override val metaClass = NHentaiSearchMetadata::class
override val lang = if (id == otherId) "all" else delegate.lang override val lang = delegate.lang
private val sourcePreferences: SharedPreferences by lazy { private val sourcePreferences: SharedPreferences by lazy {
context.getSharedPreferences("source_$id", 0x0000) context.getSharedPreferences("source_$id", 0x0000)
@ -156,14 +156,6 @@ class NHentai(delegate: HttpSource, val context: Context) :
val count: Long? = null val count: Long? = null
) )
override fun toString() = "$name (${lang.uppercase()})"
override fun ensureDelegateCompatible() {
if (versionId != delegate.versionId) {
throw IncompatibleDelegateException("Delegate source is not compatible (versionId: $versionId <=> ${delegate.versionId})!")
}
}
override val matchingHosts = listOf( override val matchingHosts = listOf(
"nhentai.net" "nhentai.net"
) )