music: move sort name number handling to setting

Make the numeric sort name handling added prior dependent on a new
"Intelligent Sorting" setting that also controls the article checks.

This kind of behavior might not be desirable in all cases, and it makes
the setting more consistent anyway.
This commit is contained in:
Alexander Capehart
2023-03-23 17:40:44 -06:00
parent 97b63992b5
commit 7c0b73b699
25 changed files with 66 additions and 61 deletions
@@ -34,7 +34,7 @@ open class FakeMusicSettings : MusicSettings {
override var multiValueSeparators: String
get() = throw NotImplementedError()
set(_) = throw NotImplementedError()
override val automaticSortNames: Boolean
override val intelligentSorting: Boolean
get() = throw NotImplementedError()
override var songSort: Sort
get() = throw NotImplementedError()
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023 Auxio Project
* RawMusicTest.kt is part of Auxio.
* DeviceMusicImplTest.kt is part of Auxio.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,11 +26,11 @@ import org.oxycblt.auxio.music.Music
import org.oxycblt.auxio.music.MusicMode
import org.oxycblt.auxio.music.metadata.Date
class RawMusicTest {
class DeviceMusicImplTest {
@Test
fun musicUid_auxio() {
val uid =
Music.UID.auxio(MusicMode.SONGS) {
createHashedUid(MusicMode.SONGS) {
update("Wheel")
update(listOf("Parannoul", "Asian Glow"))
update("Paraglow")