pull/901/head
deniscerri 11 months ago
parent 1cfbb344b0
commit 04b5dd5f72
No known key found for this signature in database
GPG Key ID: 95C43D517D830350

@ -443,7 +443,7 @@ class DownloadVideoFragment(private var resultItem: ResultItem? = null, private
downloadItem.videoPreferences.compatibilityMode = it
container.isEnabled = !it
if (it) {
container.editText?.setText("mkv")
containerAutoCompleteTextView.setText("mkv",false)
downloadItem.container = "mkv"
}
},

@ -928,7 +928,7 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
val preferredAudioCodec = sharedPreferences.getString("audio_codec", "")!!
val aCodecPrefIndex = context.getStringArray(R.array.audio_codec_values).indexOf(preferredAudioCodec)
val aCodecPref = runCatching { context.getStringArray(R.array.audio_codec_values_ytdlp)[aCodecPrefIndex] }.getOrElse { "" }
var aCodecPref = runCatching { context.getStringArray(R.array.audio_codec_values_ytdlp)[aCodecPrefIndex] }.getOrElse { "" }
when(type){
DownloadViewModel.Type.audio -> {
@ -1129,7 +1129,7 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
}else{
if (downloadItem.videoPreferences.compatibilityMode) {
request.addOption("--recode-video", "mp4")
request.addOption("--merge-output-format", "mkv")
request.addOption("--merge-output-format", "mp4/mkv")
}
else {
request.addOption("--merge-output-format", outputContainer.lowercase())
@ -1177,7 +1177,12 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
val preferredCodec = sharedPreferences.getString("video_codec", "")
val preferredQuality = sharedPreferences.getString("video_quality", "best")
val vCodecPrefIndex = context.getStringArray(R.array.video_codec_values).indexOf(preferredCodec)
val vCodecPref = context.getStringArray(R.array.video_codec_values_ytdlp)[vCodecPrefIndex]
var vCodecPref = context.getStringArray(R.array.video_codec_values_ytdlp)[vCodecPrefIndex]
if (downloadItem.videoPreferences.compatibilityMode) {
vCodecPref = "h264"
aCodecPref = "aac"
}
val defaultFormats = context.resources.getStringArray(R.array.video_formats_values)
val usingGenericFormat = defaultFormats.contains(videoF) || downloadItem.allFormats.isEmpty() || downloadItem.allFormats == formatUtil.getGenericVideoFormats(context.resources)

@ -111,7 +111,7 @@
<com.google.android.material.chip.Chip
android:id="@+id/recode_video"
style="@style/Widget.Material3.Chip.Filter.Elevated"
style="@style/Widget.Material3.Chip.Assist.Elevated"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"

Loading…
Cancel
Save