This commit is contained in:
deniscerri 2023-04-21 11:21:40 +02:00
parent e1f8ed9989
commit bdf91c8a12
No known key found for this signature in database
GPG key ID: 95C43D517D830350
4 changed files with 29 additions and 11 deletions

View file

@ -76,12 +76,12 @@ class FormatSelectionBottomSheetDialog(private val items: List<DownloadItem?>, p
val linearLayout = view.findViewById<LinearLayout>(R.id.format_list_linear_layout)
val shimmers = view.findViewById<ShimmerFrameLayout>(R.id.format_list_shimmer)
shimmers.visibility = View.GONE
val hasGenericFormats = when(items.first()!!.type){
Type.audio -> formats.first().size == resources.getStringArray(R.array.audio_formats).size
else -> formats.first().size == resources.getStringArray(R.array.video_formats).size
}
if (items.size > 1){
val hasGenericFormats = when(items.first()!!.type){
Type.audio -> formats.first().size == resources.getStringArray(R.array.audio_formats).size
else -> formats.first().size == resources.getStringArray(R.array.video_formats).size
}
if (!hasGenericFormats){
formatCollection.addAll(formats)
val flattenFormats = formats.flatten()
@ -102,9 +102,11 @@ class FormatSelectionBottomSheetDialog(private val items: List<DownloadItem?>, p
addFormatsToView(linearLayout)
}else{
chosenFormats = formats.flatten()
chosenFormats = when(items.first()?.type){
Type.audio -> chosenFormats.filter { it.format_note.contains("audio", ignoreCase = true) }
else -> chosenFormats.filter { !it.format_note.contains("audio", ignoreCase = true) }
if(!hasGenericFormats){
chosenFormats = when(items.first()?.type){
Type.audio -> chosenFormats.filter { it.format_note.contains("audio", ignoreCase = true) }
else -> chosenFormats.filter { !it.format_note.contains("audio", ignoreCase = true) }
}
}
addFormatsToView(linearLayout)
}

View file

@ -140,7 +140,7 @@
<TextView
android:layout_width="0dp"
android:text="@string/title"
android:text="@string/format"
android:layout_weight="50"
android:textSize="18sp"
android:layout_margin="10dp"

View file

@ -4,8 +4,8 @@
buildscript {
def versionMajor = 1
def versionMinor = 5
def versionPatch = 1
def versionMinor = 6
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
ext {

View file

@ -0,0 +1,16 @@
New features:
restrict filenames
share files
sponsor block filters in the download card
tablet ui
make multiple cuts in a video based on time span or chapter
range picker in playlist card
get a common format for all playlist items
automatic format updates preference
multiple search engines
stack search queries
contextual menus for batch deletion or other actions
swipe right/left for download cards for certain actions
download subtitle files and choose sub language
metered networks preference