Remove secure Exh option in favor og always going https
This commit is contained in:
parent
136dd6c43f
commit
c7673f7b4b
@ -251,7 +251,5 @@ object PreferenceKeys {
|
|||||||
|
|
||||||
const val eh_enabled_categories = "eh_enabled_categories"
|
const val eh_enabled_categories = "eh_enabled_categories"
|
||||||
|
|
||||||
const val eh_secure_exh = "secure_exh"
|
|
||||||
|
|
||||||
const val eh_ehentai_quality = "ehentai_quality"
|
const val eh_ehentai_quality = "ehentai_quality"
|
||||||
}
|
}
|
||||||
|
@ -268,8 +268,6 @@ class PreferencesHelper(val context: Context) {
|
|||||||
|
|
||||||
fun enableExhentai() = flowPrefs.getBoolean(Keys.eh_enableExHentai, false)
|
fun enableExhentai() = flowPrefs.getBoolean(Keys.eh_enableExHentai, false)
|
||||||
|
|
||||||
fun secureEXH() = flowPrefs.getBoolean(Keys.eh_secure_exh, true)
|
|
||||||
|
|
||||||
fun imageQuality() = flowPrefs.getString(Keys.eh_ehentai_quality, "auto")
|
fun imageQuality() = flowPrefs.getString(Keys.eh_ehentai_quality, "auto")
|
||||||
|
|
||||||
fun useHentaiAtHome() = flowPrefs.getBoolean("enable_hah", true)
|
fun useHentaiAtHome() = flowPrefs.getBoolean("enable_hah", true)
|
||||||
|
@ -71,13 +71,6 @@ class EHentai(
|
|||||||
) : HttpSource(), LewdSource<EHentaiSearchMetadata, Document>, UrlImportableSource {
|
) : HttpSource(), LewdSource<EHentaiSearchMetadata, Document>, UrlImportableSource {
|
||||||
override val metaClass = EHentaiSearchMetadata::class
|
override val metaClass = EHentaiSearchMetadata::class
|
||||||
|
|
||||||
val schema: String
|
|
||||||
get() = if (prefs.secureEXH().get()) {
|
|
||||||
"https"
|
|
||||||
} else {
|
|
||||||
"http"
|
|
||||||
}
|
|
||||||
|
|
||||||
val domain: String
|
val domain: String
|
||||||
get() = if (exh) {
|
get() = if (exh) {
|
||||||
"exhentai.org"
|
"exhentai.org"
|
||||||
@ -86,7 +79,7 @@ class EHentai(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override val baseUrl: String
|
override val baseUrl: String
|
||||||
get() = "$schema://$domain"
|
get() = "https://$domain"
|
||||||
|
|
||||||
override val lang = "all"
|
override val lang = "all"
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
@ -567,23 +560,23 @@ class EHentai(
|
|||||||
fun rawCookies(sp: Int): Map<String, String> {
|
fun rawCookies(sp: Int): Map<String, String> {
|
||||||
val cookies: MutableMap<String, String> = mutableMapOf()
|
val cookies: MutableMap<String, String> = mutableMapOf()
|
||||||
if (prefs.enableExhentai().get()) {
|
if (prefs.enableExhentai().get()) {
|
||||||
cookies[LoginController.MEMBER_ID_COOKIE] = prefs.memberIdVal().get()!!
|
cookies[LoginController.MEMBER_ID_COOKIE] = prefs.memberIdVal().get()
|
||||||
cookies[LoginController.PASS_HASH_COOKIE] = prefs.passHashVal().get()!!
|
cookies[LoginController.PASS_HASH_COOKIE] = prefs.passHashVal().get()
|
||||||
cookies[LoginController.IGNEOUS_COOKIE] = prefs.igneousVal().get()!!
|
cookies[LoginController.IGNEOUS_COOKIE] = prefs.igneousVal().get()
|
||||||
cookies["sp"] = sp.toString()
|
cookies["sp"] = sp.toString()
|
||||||
|
|
||||||
val sessionKey = prefs.eh_settingsKey().get()
|
val sessionKey = prefs.eh_settingsKey().get()
|
||||||
if (sessionKey != null) {
|
if (sessionKey != "") {
|
||||||
cookies["sk"] = sessionKey
|
cookies["sk"] = sessionKey
|
||||||
}
|
}
|
||||||
|
|
||||||
val sessionCookie = prefs.eh_sessionCookie().get()
|
val sessionCookie = prefs.eh_sessionCookie().get()
|
||||||
if (sessionCookie != null) {
|
if (sessionCookie != "") {
|
||||||
cookies["s"] = sessionCookie
|
cookies["s"] = sessionCookie
|
||||||
}
|
}
|
||||||
|
|
||||||
val hathPerksCookie = prefs.eh_hathPerksCookies().get()
|
val hathPerksCookie = prefs.eh_hathPerksCookies().get()
|
||||||
if (hathPerksCookie != null) {
|
if (hathPerksCookie != "") {
|
||||||
cookies["hath_perks"] = hathPerksCookie
|
cookies["hath_perks"] = hathPerksCookie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,13 +486,6 @@ class SettingsEhController : SettingsController() {
|
|||||||
summary = "When browsing ExHentai/E-Hentai should the watched list filter be enabled by default"
|
summary = "When browsing ExHentai/E-Hentai should the watched list filter be enabled by default"
|
||||||
}
|
}
|
||||||
|
|
||||||
switchPreference {
|
|
||||||
defaultValue = true
|
|
||||||
key = PreferenceKeys.eh_secure_exh
|
|
||||||
title = "Secure ExHentai/E-Hentai"
|
|
||||||
summary = "Use the HTTPS version of ExHentai/E-Hentai."
|
|
||||||
}
|
|
||||||
|
|
||||||
listPreference {
|
listPreference {
|
||||||
defaultValue = "auto"
|
defaultValue = "auto"
|
||||||
key = PreferenceKeys.eh_ehentai_quality
|
key = PreferenceKeys.eh_ehentai_quality
|
||||||
|
Loading…
x
Reference in New Issue
Block a user