feat: independent preferred format size for audio (fixes #1316)

pull/1366/head
Rayzien 3 days ago
parent 35e6985f77
commit f1ed5e1b1c

@ -28,7 +28,9 @@ class FormatUtil(private var context: Context) {
@SuppressLint("RestrictedApi")
fun getAudioFormatImportance(forVideoDownload: Boolean) : List<String> {
val preferredFormatSize = sharedPreferences.getString("preferred_format_size", "")
val preferredFormatSizeAudio = sharedPreferences.getString("preferred_format_size_audio", "")
val preferredFormatSizeGeneral = sharedPreferences.getString("preferred_format_size", "")
val preferredFormatSize = if (!preferredFormatSizeAudio.isNullOrEmpty()) preferredFormatSizeAudio else preferredFormatSizeGeneral
if (sharedPreferences.getBoolean("use_format_sorting", false)) {
val itemValues = context.getStringArray(R.array.format_importance_audio_values).toMutableList()

@ -490,6 +490,7 @@
<string name="video_compatible_summary">Recodes the video making it compatible with other apps</string>
<string name="no_free_space_warning">There is no free space for this configuration.</string>
<string name="preferred_format_size">Preferred Format Size</string>
<string name="preferred_format_size_audio">Preferred Audio Format Size</string>
<string name="smallest">Smallest</string>
<string name="largest">Largest</string>
<string name="prefer_drc_audio">Prefer DRC Audio</string>

@ -328,6 +328,16 @@
app:useSimpleSummaryProvider="true"
app:title="@string/preferred_format_size" />
<ListPreference
app:icon="@drawable/ic_format"
app:dialogTitle="@string/preferred_format_size_audio"
app:entries="@array/preferred_format_size"
app:entryValues="@array/preferred_format_size_values"
android:defaultValue=""
app:key="preferred_format_size_audio"
app:useSimpleSummaryProvider="true"
app:title="@string/preferred_format_size_audio" />
</PreferenceCategory>
<Preference

Loading…
Cancel
Save