mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed pref quality
This commit is contained in:
parent
b942e066ee
commit
fafc498df9
2 changed files with 5 additions and 20 deletions
|
@ -47,8 +47,8 @@ import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showNginxTextInputDialog
|
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showMultiDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showMultiDialog
|
||||||
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showNginxTextInputDialog
|
||||||
import com.lagradost.cloudstream3.utils.SubtitleHelper
|
import com.lagradost.cloudstream3.utils.SubtitleHelper
|
||||||
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
|
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
|
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
|
||||||
|
@ -684,8 +684,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPref(R.string.quality_pref_key)?.setOnPreferenceClickListener {
|
getPref(R.string.quality_pref_key)?.setOnPreferenceClickListener {
|
||||||
val prefNames = resources.getStringArray(R.array.quality_pref)
|
val prefValues = Qualities.values().map { it.value }.reversed().toMutableList()
|
||||||
val prefValues = resources.getIntArray(R.array.quality_pref_values)
|
prefValues.remove(Qualities.Unknown.value)
|
||||||
|
|
||||||
|
val prefNames = prefValues.map { Qualities.getStringByInt(it) }
|
||||||
|
|
||||||
val currentQuality =
|
val currentQuality =
|
||||||
settingsManager.getInt(
|
settingsManager.getInt(
|
||||||
|
|
|
@ -14,23 +14,6 @@
|
||||||
<item>@id/cast_button_type_forward_30_seconds</item>
|
<item>@id/cast_button_type_forward_30_seconds</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="quality_pref">
|
|
||||||
<item>2160p</item>
|
|
||||||
<item>1440p</item>
|
|
||||||
<item>1080p</item>
|
|
||||||
<item>720p</item>
|
|
||||||
<item>480p</item>
|
|
||||||
<item>360p</item>
|
|
||||||
</array>
|
|
||||||
<array name="quality_pref_values">
|
|
||||||
<item>4</item>
|
|
||||||
<item>3</item>
|
|
||||||
<item>2</item>
|
|
||||||
<item>1</item>
|
|
||||||
<item>-1</item>
|
|
||||||
<item>-2</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="dns_pref">
|
<array name="dns_pref">
|
||||||
<item>@string/none</item>
|
<item>@string/none</item>
|
||||||
<item>Google</item>
|
<item>Google</item>
|
||||||
|
|
Loading…
Reference in a new issue