Merge pull request #1057 from OxygenCobalt/dev
v4.0.3 (with backported fix)
This commit is contained in:
commit
8f41f35bc9
5 changed files with 27 additions and 3 deletions
|
@ -76,6 +76,14 @@ precise/original dates, sort tags, and more
|
|||
|
||||
You can support Auxio's development through [my Github Sponsors page](https://github.com/sponsors/OxygenCobalt). Get the ability to prioritize features and have your profile added to the README, Release Changelogs, and even the app itself!
|
||||
|
||||
<p align="center"><b>$16/month supporters:</b></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/mark-pitblado"><img src="https://avatars.githubusercontent.com/u/86988982?v=4" width=75 /></a>
|
||||
<br/>
|
||||
<a href="https://github.com/mark-pitblado"><b>Mark Pitblado</b></a>
|
||||
</p>
|
||||
|
||||
<p align="center"><b>$8/month supporters:</b></p>
|
||||
|
||||
<p align="center">
|
||||
|
|
|
@ -72,6 +72,9 @@ class AboutFragment : ViewBindingFragment<FragmentAboutBinding>() {
|
|||
binding.aboutLicenses.setOnClickListener { requireContext().openInBrowser(LINK_LICENSES) }
|
||||
binding.aboutProfile.setOnClickListener { requireContext().openInBrowser(LINK_PROFILE) }
|
||||
binding.aboutDonate.setOnClickListener { requireContext().openInBrowser(LINK_DONATE) }
|
||||
binding.aboutSupMarkPitblado.setOnClickListener {
|
||||
requireContext().openInBrowser(LINK_SUP_MARK_PITBLADO)
|
||||
}
|
||||
binding.aboutFeedbackGithub.setOnClickListener {
|
||||
requireContext().openInBrowser(LINK_NEW_ISSUE)
|
||||
}
|
||||
|
@ -113,5 +116,6 @@ class AboutFragment : ViewBindingFragment<FragmentAboutBinding>() {
|
|||
const val LINK_NEW_ISSUE = "$LINK_SOURCE/issues/new"
|
||||
const val LINK_PROFILE = "https://github.com/OxygenCobalt"
|
||||
const val LINK_DONATE = "https://github.com/sponsors/OxygenCobalt"
|
||||
const val LINK_SUP_MARK_PITBLADO = "https://github.com/mark-pitblado"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,6 +226,17 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_sup_mark_pitblado"
|
||||
style="@style/Widget.Auxio.TextView.Icon.Clickable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/sup_mark_pitblado"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:drawableStartCompat="@drawable/ic_person_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/about_licenses" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_supporters_promo"
|
||||
style="@style/Widget.Auxio.TextView.Icon.Clickable"
|
||||
|
|
|
@ -20,4 +20,5 @@
|
|||
<string name="pkg_authority_cover">org.oxycblt.auxio.image.CoverProvider</string>
|
||||
|
||||
<!-- Supporter Namespace | Sponsor usernames -->
|
||||
<string name="sup_mark_pitblado">Mark Pitblado</string>
|
||||
</resources>
|
|
@ -117,7 +117,7 @@ class MutableFSCovers(private val context: Context) : MutableCovers<FDCover> {
|
|||
// that should not be managed by the app
|
||||
}
|
||||
|
||||
private fun coverArtScore(file: DeviceFile): Int {
|
||||
private suspend fun coverArtScore(file: DeviceFile): Int {
|
||||
if (!file.mimeType.startsWith("image/", ignoreCase = true)) {
|
||||
// Not an image file. You lose!
|
||||
return 0
|
||||
|
@ -127,9 +127,9 @@ class MutableFSCovers(private val context: Context) : MutableCovers<FDCover> {
|
|||
val name = filename.substringBeforeLast('.')
|
||||
val extension = filename.substringAfterLast('.', "")
|
||||
// See if the name contains any of the preferred cover names. This helps weed out
|
||||
// images that are not actually cover art and are just there.
|
||||
// images that are not actually cover art and are just there.,
|
||||
var score =
|
||||
preferredCoverNames
|
||||
(preferredCoverNames + requireNotNull(file.parent.await().path.name))
|
||||
.withIndex()
|
||||
.filter { name.contains(it.value, ignoreCase = true) }
|
||||
.sumOf { it.index + 1 }
|
||||
|
|
Loading…
Reference in a new issue