Merge pull request #5424 from synicalico/patch-1

fix: crash on download menu
This commit is contained in:
Bnyro 2024-01-03 17:39:38 +01:00 committed by GitHub
commit 217b50c293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ class DownloadDialog : DialogFragment() {
getSel(VIDEO_DOWNLOAD_QUALITY), getSel(VIDEO_DOWNLOAD_QUALITY),
getSel(VIDEO_DOWNLOAD_FORMAT) getSel(VIDEO_DOWNLOAD_FORMAT)
)?.let { )?.let {
binding.audioSpinner.selectedItemPosition = it + 1 binding.videoSpinner.selectedItemPosition = it + 1
} }
getStreamSelection( getStreamSelection(
audioStreams, audioStreams,
@ -225,7 +225,7 @@ class DownloadDialog : DialogFragment() {
} }
subtitles.indexOfFirst { it.code == getSel(SUBTITLE_LANGUAGE) }.takeIf { it != -1 }?.let { subtitles.indexOfFirst { it.code == getSel(SUBTITLE_LANGUAGE) }.takeIf { it != -1 }?.let {
binding.audioSpinner.selectedItemPosition = it + 1 binding.subtitleSpinner.selectedItemPosition = it + 1
} }
} }