all: minor cleanup

This commit is contained in:
Alexander Capehart 2023-06-24 17:45:36 -06:00
parent 2adb34dffe
commit 5bda85fe36
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
5 changed files with 5 additions and 3 deletions

View file

@ -39,6 +39,7 @@ import org.oxycblt.auxio.music.info.ReleaseType
import org.oxycblt.auxio.music.metadata.parseId3GenreNames import org.oxycblt.auxio.music.metadata.parseId3GenreNames
import org.oxycblt.auxio.music.metadata.parseMultiValue import org.oxycblt.auxio.music.metadata.parseMultiValue
import org.oxycblt.auxio.playback.replaygain.ReplayGainAdjustment import org.oxycblt.auxio.playback.replaygain.ReplayGainAdjustment
import org.oxycblt.auxio.util.logD
import org.oxycblt.auxio.util.nonZeroOrNull import org.oxycblt.auxio.util.nonZeroOrNull
import org.oxycblt.auxio.util.toUuidOrNull import org.oxycblt.auxio.util.toUuidOrNull
import org.oxycblt.auxio.util.unlikelyToBeNull import org.oxycblt.auxio.util.unlikelyToBeNull
@ -217,6 +218,7 @@ class SongImpl(private val rawSong: RawSong, musicSettings: MusicSettings) : Son
} }
check(_genres.isNotEmpty()) { "Malformed song: No genres" } check(_genres.isNotEmpty()) { "Malformed song: No genres" }
logD("$this $rawGenres $_genres]")
for (i in _genres.indices) { for (i in _genres.indices) {
// Non-destructively reorder the linked genres so that they align with // Non-destructively reorder the linked genres so that they align with
// the genre ordering within the song metadata. // the genre ordering within the song metadata.

View file

@ -364,7 +364,7 @@ private class Api21MediaStoreExtractor(context: Context, musicSettings: MusicSet
arrayOf( arrayOf(
MediaStore.Audio.AudioColumns.TRACK, MediaStore.Audio.AudioColumns.TRACK,
// Below API 29, we are restricted to the absolute path (Called DATA by // Below API 29, we are restricted to the absolute path (Called DATA by
// MedaStore) when working with audio files. // MediaStore) when working with audio files.
MediaStore.Audio.AudioColumns.DATA) MediaStore.Audio.AudioColumns.DATA)
// The selector should be configured to convert the given directories instances to their // The selector should be configured to convert the given directories instances to their

View file

@ -39,6 +39,7 @@ import org.oxycblt.auxio.util.logE
* @author Alexander Capehart * @author Alexander Capehart
* *
* TODO: Communicate errors * TODO: Communicate errors
* TODO: How to handle empty playlists that appear because all of their songs have disappeared?
*/ */
interface UserLibrary { interface UserLibrary {
/** The current user-defined playlists. */ /** The current user-defined playlists. */

View file

@ -20,7 +20,6 @@
<dimen name="size_corners_medium">16dp</dimen> <dimen name="size_corners_medium">16dp</dimen>
<dimen name="size_corners_mid_large">24dp</dimen> <dimen name="size_corners_mid_large">24dp</dimen>
<dimen name="size_btn">48dp</dimen> <dimen name="size_btn">48dp</dimen>
<dimen name="size_accent_item">56dp</dimen> <dimen name="size_accent_item">56dp</dimen>
<dimen name="size_bottom_sheet_bar">64dp</dimen> <dimen name="size_bottom_sheet_bar">64dp</dimen>

View file

@ -216,7 +216,7 @@
<item name="android:paddingEnd">@dimen/spacing_small</item> <item name="android:paddingEnd">@dimen/spacing_small</item>
<item name="android:paddingTop">@dimen/spacing_small</item> <item name="android:paddingTop">@dimen/spacing_small</item>
<item name="android:paddingBottom">@dimen/spacing_small</item> <item name="android:paddingBottom">@dimen/spacing_small</item>
<!-- Intentional to prevent button from spamming the log console over --> <!-- Intentional to prevent button from spamming the log console -->
<item name="iconTint">@color/m3_text_button_foreground_color_selector</item> <item name="iconTint">@color/m3_text_button_foreground_color_selector</item>
</style> </style>