fixed pref quality

This commit is contained in:
LagradOst 2022-04-18 21:31:14 +02:00
parent b942e066ee
commit fafc498df9
2 changed files with 5 additions and 20 deletions

View file

@ -47,8 +47,8 @@ import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
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.showNginxTextInputDialog
import com.lagradost.cloudstream3.utils.SubtitleHelper
import com.lagradost.cloudstream3.utils.SubtitleHelper.getFlagFromIso
import com.lagradost.cloudstream3.utils.UIHelper.dismissSafe
@ -684,8 +684,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
}
getPref(R.string.quality_pref_key)?.setOnPreferenceClickListener {
val prefNames = resources.getStringArray(R.array.quality_pref)
val prefValues = resources.getIntArray(R.array.quality_pref_values)
val prefValues = Qualities.values().map { it.value }.reversed().toMutableList()
prefValues.remove(Qualities.Unknown.value)
val prefNames = prefValues.map { Qualities.getStringByInt(it) }
val currentQuality =
settingsManager.getInt(

View file

@ -14,23 +14,6 @@
<item>@id/cast_button_type_forward_30_seconds</item>
</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">
<item>@string/none</item>
<item>Google</item>