[Mangadex] Remove eu/eu2 image server options and update strings to match current website options (#1680)
[Mangadex] Remove eu/eu2 image server options and update strings to match current website options
This commit is contained in:
parent
28d2cb1c19
commit
c1bc1bf6a9
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: MangaDex'
|
appName = 'Tachiyomi: MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangadexFactory'
|
extClass = '.MangadexFactory'
|
||||||
extVersionCode = 69
|
extVersionCode = 70
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -584,8 +584,8 @@ abstract class Mangadex(
|
||||||
val serverPref = ListPreference(screen.context).apply {
|
val serverPref = ListPreference(screen.context).apply {
|
||||||
key = SERVER_PREF_Title
|
key = SERVER_PREF_Title
|
||||||
title = SERVER_PREF_Title
|
title = SERVER_PREF_Title
|
||||||
entries = arrayOf("Auto", "North America", "North America 2", "Europe", "Europe 2", "Rest of the World")
|
entries = SERVER_PREF_ENTRIES
|
||||||
entryValues = arrayOf("0", "na", "na2", "eu", "eu2", "row")
|
entryValues = SERVER_PREF_ENTRY_VALUES
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
setOnPreferenceChangeListener { _, newValue ->
|
||||||
|
@ -603,7 +603,11 @@ abstract class Mangadex(
|
||||||
|
|
||||||
private fun getShowR18(): Int = preferences.getInt(SHOW_R18_PREF, 0)
|
private fun getShowR18(): Int = preferences.getInt(SHOW_R18_PREF, 0)
|
||||||
private fun getShowThumbnail(): Int = preferences.getInt(SHOW_THUMBNAIL_PREF, 0)
|
private fun getShowThumbnail(): Int = preferences.getInt(SHOW_THUMBNAIL_PREF, 0)
|
||||||
private fun getServer(): String = preferences.getString(SERVER_PREF, "0")
|
private fun getServer(): String {
|
||||||
|
val default = SERVER_PREF_ENTRY_VALUES.first()
|
||||||
|
return preferences.getString(SERVER_PREF, default).takeIf { it in SERVER_PREF_ENTRY_VALUES }
|
||||||
|
?: default
|
||||||
|
}
|
||||||
|
|
||||||
private class TextField(name: String, val key: String) : Filter.Text(name)
|
private class TextField(name: String, val key: String) : Filter.Text(name)
|
||||||
private class Tag(val id: String, name: String) : Filter.TriState(name)
|
private class Tag(val id: String, name: String) : Filter.TriState(name)
|
||||||
|
@ -765,6 +769,8 @@ abstract class Mangadex(
|
||||||
|
|
||||||
private const val SERVER_PREF_Title = "Image server"
|
private const val SERVER_PREF_Title = "Image server"
|
||||||
private const val SERVER_PREF = "imageServer"
|
private const val SERVER_PREF = "imageServer"
|
||||||
|
private val SERVER_PREF_ENTRIES = arrayOf("Automatic", "NA/EU 1", "NA/EU 2", "Rest of the world")
|
||||||
|
private val SERVER_PREF_ENTRY_VALUES = arrayOf("0", "na", "na2", "row")
|
||||||
|
|
||||||
private const val API_MANGA = "/api/manga/"
|
private const val API_MANGA = "/api/manga/"
|
||||||
private const val API_CHAPTER = "/api/chapter/"
|
private const val API_CHAPTER = "/api/chapter/"
|
||||||
|
|
Loading…
Reference in New Issue