more stuff

This commit is contained in:
deniscerri 2025-08-26 15:48:36 +02:00
parent 84f13b1c86
commit 56976125cf
No known key found for this signature in database
GPG key ID: 95C43D517D830350
13 changed files with 141 additions and 56 deletions

View file

@ -937,7 +937,7 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel
}else { }else {
it.status = DownloadRepository.Status.Queued.toString() it.status = DownloadRepository.Status.Queued.toString()
} }
if (it.rowNumber == 0) { if (it.rowNumber == 0 && items.size > 1) {
it.rowNumber = idx + 1 it.rowNumber = idx + 1
} }

View file

@ -190,7 +190,12 @@ class FolderSettingsFragment : BaseSettingsFragment() {
} }
var cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() } var cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() }
clearCache!!.summary = "(${FileUtil.convertFileSize(cacheSize)}) ${resources.getString(R.string.clear_temporary_files_summary)}" val filesize = if (cacheSize < 10000) {
"0B"
}else {
FileUtil.convertFileSize(cacheSize)
}
clearCache!!.summary = "(${filesize}) ${resources.getString(R.string.clear_temporary_files_summary)}"
clearCache!!.onPreferenceClickListener = clearCache!!.onPreferenceClickListener =
Preference.OnPreferenceClickListener { Preference.OnPreferenceClickListener {
lifecycleScope.launch { lifecycleScope.launch {
@ -214,7 +219,12 @@ class FolderSettingsFragment : BaseSettingsFragment() {
Snackbar.make(requireView(), getString(R.string.cache_cleared), Snackbar.LENGTH_SHORT).show() Snackbar.make(requireView(), getString(R.string.cache_cleared), Snackbar.LENGTH_SHORT).show()
cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() } cacheSize = File(FileUtil.getCachePath(requireContext())).walkBottomUp().fold(0L) { acc, file -> acc + file.length() }
clearCache!!.summary = "(${FileUtil.convertFileSize(cacheSize)}) ${resources.getString(R.string.clear_temporary_files_summary)}" val filesize = if (cacheSize < 10000) {
"0B"
}else {
FileUtil.convertFileSize(cacheSize)
}
clearCache!!.summary = "(${filesize}) ${resources.getString(R.string.clear_temporary_files_summary)}"
}else{ }else{
Snackbar.make(requireView(), getString(R.string.downloads_running_try_later), Snackbar.LENGTH_SHORT).show() Snackbar.make(requireView(), getString(R.string.downloads_running_try_later), Snackbar.LENGTH_SHORT).show()
} }

View file

@ -320,7 +320,7 @@ object Extensions {
Picasso.get() Picasso.get()
.load(imageURL) .load(imageURL)
.resize(1280, 0) .resize(1280, 0)
.transform(BlurTransformation(context, 7, 1)) .transform(BlurTransformation(context, 1, 1))
.onlyScaleDown() .onlyScaleDown()
.into(this) .into(this)

View file

@ -27,15 +27,15 @@ class FormatUtil(private var context: Context) {
this.reverse() this.reverse()
} }
private val preferSmallerFormats = sharedPreferences.getBoolean("prefer_smaller_formats", false)
@SuppressLint("RestrictedApi") @SuppressLint("RestrictedApi")
fun getAudioFormatImportance() : List<String> { fun getAudioFormatImportance() : List<String> {
val preferredFormatSize = sharedPreferences.getString("preferred_format_size", "")
if (sharedPreferences.getBoolean("use_format_sorting", false)) { if (sharedPreferences.getBoolean("use_format_sorting", false)) {
val itemValues = context.getStringArray(R.array.format_importance_audio_values).toMutableList() val itemValues = context.getStringArray(R.array.format_importance_audio_values).toMutableList()
val orderPreferences = sharedPreferences.getString("format_importance_audio", itemValues.joinToString(","))!!.split(",").toMutableList() val orderPreferences = sharedPreferences.getString("format_importance_audio", itemValues.joinToString(","))!!.split(",").toMutableList()
if (preferSmallerFormats) {
if (preferredFormatSize == "smallest") {
orderPreferences.remove("file_size") orderPreferences.remove("file_size")
orderPreferences.add(0,"smallsize") orderPreferences.add(0,"smallsize")
} }
@ -47,10 +47,11 @@ class FormatUtil(private var context: Context) {
return orderPreferences return orderPreferences
}else { }else {
val formatImportance = mutableListOf("id","codec", "container", "language", "file_size") val formatImportance = mutableListOf("id","codec", "container", "language")
if (sharedPreferences.getBoolean("prefer_smaller_formats", false)) { if (preferredFormatSize == "smallest") {
formatImportance.add(0, "smallsize") formatImportance.add("smallsize")
formatImportance.remove("file_size") }else if (preferredFormatSize == "biggest") {
formatImportance.add("file_size")
} }
val preferContainerOverCodec = sharedPreferences.getBoolean("prefer_container_over_codec_audio", false) val preferContainerOverCodec = sharedPreferences.getBoolean("prefer_container_over_codec_audio", false)
@ -64,20 +65,24 @@ class FormatUtil(private var context: Context) {
@SuppressLint("RestrictedApi") @SuppressLint("RestrictedApi")
fun getVideoFormatImportance() : List<String> { fun getVideoFormatImportance() : List<String> {
val preferredFormatSize = sharedPreferences.getString("preferred_format_size", "")
if (sharedPreferences.getBoolean("use_format_sorting", false)) { if (sharedPreferences.getBoolean("use_format_sorting", false)) {
val itemValues = context.getStringArray(R.array.format_importance_video_values).toList() val itemValues = context.getStringArray(R.array.format_importance_video_values).toList()
val orderPreferences = sharedPreferences.getString("format_importance_video", itemValues.joinToString(","))!!.split(",").toMutableList() val orderPreferences = sharedPreferences.getString("format_importance_video", itemValues.joinToString(","))!!.split(",").toMutableList()
if (preferSmallerFormats) {
if (preferredFormatSize == "smallest") {
orderPreferences.remove("file_size") orderPreferences.remove("file_size")
orderPreferences.add("smallsize") orderPreferences.add("smallsize")
} }
return orderPreferences return orderPreferences
}else { }else {
val formatImportance = mutableListOf("id","resolution", "codec", "container", "file_size") val formatImportance = mutableListOf("id","resolution", "codec", "container")
if (sharedPreferences.getBoolean("prefer_smaller_formats", false)) { if (preferredFormatSize == "smallest") {
formatImportance.add("smallsize") formatImportance.add("smallsize")
formatImportance.remove("file_size") }else if (preferredFormatSize == "biggest") {
formatImportance.add("file_size")
} }
return formatImportance return formatImportance
@ -101,9 +106,13 @@ class FormatUtil(private var context: Context) {
result result
} }
"id" -> { "id" -> {
(audioFormatIDPreference.contains(b.format_id)).compareTo( if (audioFormatIDPreference.isEmpty()) {
audioFormatIDPreference.contains(a.format_id) 0
) }else {
(audioFormatIDPreference.contains(b.format_id)).compareTo(
audioFormatIDPreference.contains(a.format_id)
)
}
} }
"language" -> { "language" -> {
@ -119,18 +128,27 @@ class FormatUtil(private var context: Context) {
} }
"codec" -> { "codec" -> {
("^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE) if (audioCodecPreference.isBlank()) {
0
}else {
("^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE)
.matches(b.acodec)) .matches(b.acodec))
.compareTo( .compareTo(
"^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE) "^(${audioCodecPreference}).*$".toRegex(RegexOption.IGNORE_CASE)
.matches(a.acodec) .matches(a.acodec)
) )
}
} }
"container" -> { "container" -> {
(audioContainerPreference == b.container).compareTo( if (audioContainerPreference.isBlank()) {
audioContainerPreference == a.container 0
) }else {
(audioContainerPreference == b.container).compareTo(
audioContainerPreference == a.container
)
}
} }
else -> 0 else -> 0
@ -160,12 +178,20 @@ class FormatUtil(private var context: Context) {
result result
} }
"id" -> { "id" -> {
videoFormatIDPreference.contains(b.format_id).compareTo(videoFormatIDPreference.contains(a.format_id)) if (videoFormatIDPreference.isEmpty()) {
0
}else {
videoFormatIDPreference.contains(b.format_id).compareTo(videoFormatIDPreference.contains(a.format_id))
}
} }
"codec" -> { "codec" -> {
val first = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(b.vcodec.uppercase()) if (videoCodecPreference.isBlank()) {
val second = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(a.vcodec.uppercase()) 0
first.compareTo(second) }else {
val first = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(b.vcodec.uppercase())
val second = videoCodecPreference.toRegex(RegexOption.IGNORE_CASE).containsMatchIn(a.vcodec.uppercase())
first.compareTo(second)
}
} }
"resolution" -> { "resolution" -> {
when (videoQualityPreference) { when (videoQualityPreference) {
@ -201,8 +227,12 @@ class FormatUtil(private var context: Context) {
(b.acodec == "none" || b.acodec == "").compareTo(a.acodec == "none" || a.acodec == "") (b.acodec == "none" || b.acodec == "").compareTo(a.acodec == "none" || a.acodec == "")
} }
"container" -> { "container" -> {
videoContainerPreference.equals(b.container, ignoreCase = true) if (videoContainerPreference.isBlank()) {
.compareTo(videoContainerPreference.equals(a.container, ignoreCase = true)) 0
}else {
videoContainerPreference.equals(b.container, ignoreCase = true)
.compareTo(videoContainerPreference.equals(a.container, ignoreCase = true))
}
} }
else -> 0 else -> 0
} }

View file

@ -18,7 +18,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:cardCornerRadius="20dp" app:cardCornerRadius="20dp"
app:cardElevation="5dp" app:cardElevation="0dp"
android:checkable="true" android:checkable="true"
app:strokeWidth="0dp" app:strokeWidth="0dp"
app:cardPreventCornerOverlap="true" app:cardPreventCornerOverlap="true"
@ -126,7 +126,6 @@
android:maxLines="2" android:maxLines="2"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="5dp" android:paddingEnd="5dp"
android:shadowColor="@color/black"
android:shadowDx="2" android:shadowDx="2"
android:shadowDy="2" android:shadowDy="2"
android:shadowRadius="1" android:shadowRadius="1"
@ -162,11 +161,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
app:layout_constraintBottom_toTopOf="@+id/output" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
app:layout_constraintTop_toBottomOf="@+id/linearlayout2_horizontalscrollview" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.51"
> >
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
@ -213,18 +211,21 @@
android:ellipsize="end" android:ellipsize="end"
android:focusable="true" android:focusable="true"
android:fontFamily="monospace" android:fontFamily="monospace"
android:maxLines="2"
android:gravity="bottom" android:gravity="bottom"
android:maxLines="2"
android:padding="10dp" android:padding="10dp"
android:shadowColor="#000" android:shadowColor="#000"
android:shadowDx="4" android:shadowDx="4"
android:shadowDy="4" android:shadowDy="4"
android:shadowRadius="2" android:shadowRadius="2"
android:textStyle="bold"
android:textColor="#FFF" android:textColor="#FFF"
android:textSize="11sp" android:textSize="11sp"
app:layout_constraintVertical_bias="1.0"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/active_pause_cancel_btns" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -29,6 +29,7 @@
style="@style/Widget.Material3.Chip.Filter.Elevated" style="@style/Widget.Material3.Chip.Filter.Elevated"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:outlineProvider="none"
android:checked="false" android:checked="false"
android:text="@string/embed_thumb"/> android:text="@string/embed_thumb"/>
@ -47,6 +48,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
android:outlineProvider="none"
android:text="@string/split_by_chapters"/> android:text="@string/split_by_chapters"/>
</com.google.android.material.chip.ChipGroup> </com.google.android.material.chip.ChipGroup>
@ -54,15 +56,15 @@
</HorizontalScrollView> </HorizontalScrollView>
<HorizontalScrollView <HorizontalScrollView
android:scrollbars="none"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" > android:layout_height="wrap_content"
android:scrollbars="none">
<com.google.android.material.chip.ChipGroup <com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:chipSpacingVertical="0dp" app:chipSpacingVertical="0dp"
app:singleLine="true" app:singleLine="true">
android:layout_height="wrap_content">
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
@ -71,10 +73,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@string/sponsorblock"
app:chipIconVisible="true"
app:chipIcon="@drawable/ic_money"
android:minWidth="30dp" android:minWidth="30dp"
android:outlineProvider="none"
android:text="@string/sponsorblock"
app:chipIcon="@drawable/ic_money"
app:chipIconVisible="true"
app:cornerRadius="10dp" app:cornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -86,10 +89,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@string/bitrate"
app:chipIconVisible="true"
app:chipIcon="@drawable/baseline_high_quality_24"
android:minWidth="30dp" android:minWidth="30dp"
android:outlineProvider="none"
android:text="@string/bitrate"
app:chipIcon="@drawable/baseline_high_quality_24"
app:chipIconVisible="true"
app:cornerRadius="10dp" app:cornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -101,10 +105,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@string/file_name_template" android:outlineProvider="none"
app:chipIconVisible="true"
app:chipIcon="@drawable/ic_edit"
android:minWidth="30dp" android:minWidth="30dp"
android:text="@string/file_name_template"
app:chipIcon="@drawable/ic_edit"
app:chipIconVisible="true"
app:cornerRadius="10dp" app:cornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -130,6 +135,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@string/use_extra_commands" android:text="@string/use_extra_commands"
android:outlineProvider="none"
app:chipIconVisible="true" app:chipIconVisible="true"
app:chipIcon="@drawable/ic_terminal" app:chipIcon="@drawable/ic_terminal"
android:minWidth="30dp" android:minWidth="30dp"
@ -145,6 +152,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
app:chipIconVisible="true" app:chipIconVisible="true"
android:outlineProvider="none"
app:chipIcon="@drawable/ic_cut" app:chipIcon="@drawable/ic_cut"
android:text="@string/cut" android:text="@string/cut"
android:minWidth="30dp" android:minWidth="30dp"

View file

@ -31,6 +31,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
android:outlineProvider="none"
android:text="@string/save_thumb" /> android:text="@string/save_thumb" />
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
@ -39,6 +40,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
android:outlineProvider="none"
android:text="@string/add_chapter" /> android:text="@string/add_chapter" />
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
@ -47,6 +49,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
android:outlineProvider="none"
android:text="@string/split_by_chapters"/> android:text="@string/split_by_chapters"/>
@ -76,6 +79,7 @@
app:chipIcon="@drawable/ic_subtitles" app:chipIcon="@drawable/ic_subtitles"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -90,6 +94,7 @@
android:text="@string/remove_audio" android:text="@string/remove_audio"
android:visibility="gone" android:visibility="gone"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -105,6 +110,7 @@
app:chipIcon="@drawable/ic_music" app:chipIcon="@drawable/ic_music"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -116,6 +122,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="false" android:checked="false"
app:chipIconVisible="true" app:chipIconVisible="true"
android:outlineProvider="none"
app:chipIcon="@drawable/baseline_video_metadata" app:chipIcon="@drawable/baseline_video_metadata"
android:text="@string/recode_video" /> android:text="@string/recode_video" />
@ -130,6 +137,7 @@
app:chipIcon="@drawable/baseline_live_tv_24" app:chipIcon="@drawable/baseline_live_tv_24"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -160,6 +168,7 @@
app:chipIcon="@drawable/ic_money" app:chipIcon="@drawable/ic_money"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -175,6 +184,7 @@
app:chipIcon="@drawable/ic_edit" app:chipIcon="@drawable/ic_edit"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -204,6 +214,7 @@
app:chipIcon="@drawable/ic_terminal" app:chipIcon="@drawable/ic_terminal"
android:minWidth="30dp" android:minWidth="30dp"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -219,6 +230,7 @@
android:minWidth="30dp" android:minWidth="30dp"
android:text="@string/cut" android:text="@string/cut"
app:cornerRadius="10dp" app:cornerRadius="10dp"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View file

@ -281,6 +281,7 @@
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/cancel" android:text="@string/cancel"
android:outlineProvider="none"
app:icon="@drawable/ic_baseline_delete_outline_24"/> app:icon="@drawable/ic_baseline_delete_outline_24"/>
<Button <Button
@ -289,6 +290,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/cut" android:text="@string/cut"
android:outlineProvider="none"
app:icon="@drawable/ic_check"/> app:icon="@drawable/ic_check"/>
</LinearLayout> </LinearLayout>

View file

@ -119,6 +119,7 @@
android:layout_margin="20dp" android:layout_margin="20dp"
android:text="@string/ok" android:text="@string/ok"
app:icon="@drawable/ic_check" app:icon="@drawable/ic_check"
android:outlineProvider="none"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View file

@ -118,6 +118,7 @@
android:maxLength="17" android:maxLength="17"
android:minWidth="30dp" android:minWidth="30dp"
android:paddingHorizontal="5dp" android:paddingHorizontal="5dp"
android:outlineProvider="none"
android:textStyle="bold" android:textStyle="bold"
app:cornerRadius="10dp" app:cornerRadius="10dp"
app:drawableStartCompat="@drawable/ic_music_formatcard" app:drawableStartCompat="@drawable/ic_music_formatcard"
@ -136,6 +137,7 @@
android:backgroundTint="?attr/colorSecondary" android:backgroundTint="?attr/colorSecondary"
android:clickable="false" android:clickable="false"
android:gravity="center" android:gravity="center"
android:outlineProvider="none"
android:maxWidth="90dp" android:maxWidth="90dp"
android:maxLines="1" android:maxLines="1"
android:minWidth="30dp" android:minWidth="30dp"
@ -157,6 +159,7 @@
android:clickable="false" android:clickable="false"
android:gravity="center" android:gravity="center"
android:minWidth="30dp" android:minWidth="30dp"
android:outlineProvider="none"
android:paddingHorizontal="5dp" android:paddingHorizontal="5dp"
android:textStyle="bold" android:textStyle="bold"
app:cornerRadius="10dp" app:cornerRadius="10dp"
@ -176,6 +179,7 @@
android:gravity="center" android:gravity="center"
android:minWidth="30dp" android:minWidth="30dp"
android:paddingHorizontal="5dp" android:paddingHorizontal="5dp"
android:outlineProvider="none"
android:textStyle="bold" android:textStyle="bold"
app:cornerRadius="10dp" app:cornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View file

@ -1574,4 +1574,16 @@
<item>64k</item> <item>64k</item>
</string-array> </string-array>
<string-array name="preferred_format_size">
<item>@string/defaultValue</item>
<item>@string/smallest</item>
<item>@string/largest</item>
</string-array>
<string-array name="preferred_format_size_values">
<item></item>
<item>smallest</item>
<item>largest</item>
</string-array>
</resources> </resources>

View file

@ -486,4 +486,7 @@
<string name="video_compatible">Compatible Video</string> <string name="video_compatible">Compatible Video</string>
<string name="video_compatible_summary">Recodes the video making it compatible with other apps</string> <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="no_free_space_warning">There is no free space for this configuration.</string>
<string name="preferred_format_size">Preferred Format Size</string>
<string name="smallest">Smallest</string>
<string name="largest">Largest</string>
</resources> </resources>

View file

@ -283,13 +283,15 @@
<PreferenceCategory android:title="@string/format"> <PreferenceCategory android:title="@string/format">
<SwitchPreferenceCompat <ListPreference
android:widgetLayout="@layout/preferece_material_switch"
app:defaultValue="false"
app:icon="@drawable/ic_format" app:icon="@drawable/ic_format"
app:key="prefer_smaller_formats" app:dialogTitle="@string/preferred_format_size"
app:title="@string/prefer_smaller_formats" /> app:entries="@array/preferred_format_size"
app:entryValues="@array/preferred_format_size_values"
android:defaultValue=""
app:key="preferred_format_size"
app:useSimpleSummaryProvider="true"
app:title="@string/preferred_format_size" />
</PreferenceCategory> </PreferenceCategory>