removed custom encryption/decryption keys option
This commit is contained in:
parent
7615210b7f
commit
e1d40edd55
1 changed files with 2 additions and 34 deletions
|
@ -314,19 +314,11 @@ class Aniwave : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getDecryptionKey(): String {
|
private fun getDecryptionKey(): String {
|
||||||
var prefKey = preferences.getString(PREF_VERIFY_KEY_DECRYPT_KEY, null)
|
return preferences.getString(PREF_VERIFY_KEY_DECRYPT_KEY, PREF_VERIFY_KEY_DECRYPT_VALUE)!!
|
||||||
if (prefKey.isNullOrBlank()) {
|
|
||||||
prefKey = PREF_VERIFY_KEY_DECRYPT_VALUE
|
|
||||||
}
|
|
||||||
return prefKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getEncryptionKey(): String {
|
private fun getEncryptionKey(): String {
|
||||||
var prefKey = preferences.getString(PREF_VERIFY_KEY_ENCRYPT_KEY, null)
|
return preferences.getString(PREF_VERIFY_KEY_ENCRYPT_KEY, PREF_VERIFY_KEY_ENCRYPT_VALUE)!!
|
||||||
if (prefKey.isNullOrBlank()) {
|
|
||||||
prefKey = PREF_VERIFY_KEY_ENCRYPT_VALUE
|
|
||||||
}
|
|
||||||
return prefKey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -484,29 +476,5 @@ class Aniwave : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||||
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
|
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
|
||||||
}
|
}
|
||||||
}.also(screen::addPreference)
|
}.also(screen::addPreference)
|
||||||
|
|
||||||
EditTextPreference(screen.context).apply {
|
|
||||||
key = PREF_VERIFY_KEY_DECRYPT_KEY
|
|
||||||
title = "Custom decryption key"
|
|
||||||
setDefaultValue("")
|
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
val newKey = newValue as String
|
|
||||||
preferences.edit().putString(key, newKey).commit()
|
|
||||||
}
|
|
||||||
}.also(screen::addPreference)
|
|
||||||
|
|
||||||
EditTextPreference(screen.context).apply {
|
|
||||||
key = PREF_VERIFY_KEY_ENCRYPT_KEY
|
|
||||||
title = "Custom encryption key"
|
|
||||||
setDefaultValue("")
|
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
val newKey = newValue as String
|
|
||||||
preferences.edit().putString(key, newKey).commit()
|
|
||||||
}
|
|
||||||
}.also(screen::addPreference)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue