music: index negative replaygain tags
Caused by an absurd error stemming from absurd helper function naming.
This commit is contained in:
parent
f8fbcac482
commit
87bb47cec3
4 changed files with 8 additions and 11 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -2,16 +2,10 @@
|
|||
|
||||
## dev
|
||||
|
||||
#### What's New
|
||||
- Menus have been refreshed with a cleaner look
|
||||
|
||||
#### What's Fixed
|
||||
- Fixed issue where one could not navigate to settings after navigating
|
||||
elsewhere
|
||||
- Fixed issue where one could not navigate to settings after navigating elsewhere
|
||||
- Fixed the queue list being non-scrollable in certain cases
|
||||
|
||||
#### Dev/Meta
|
||||
- Unified navigation graph
|
||||
- Fixed negative ReplayGain adjustments not being applied
|
||||
|
||||
## 3.1.3
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.oxycblt.auxio.music.info.Date
|
|||
import org.oxycblt.auxio.music.metadata.correctWhitespace
|
||||
import org.oxycblt.auxio.music.metadata.splitEscaped
|
||||
|
||||
@Database(entities = [CachedSong::class], version = 32, exportSchema = false)
|
||||
@Database(entities = [CachedSong::class], version = 34, exportSchema = false)
|
||||
abstract class CacheDatabase : RoomDatabase() {
|
||||
abstract fun cachedSongsDao(): CachedSongsDao
|
||||
}
|
||||
|
|
|
@ -314,7 +314,10 @@ private class TagWorkerImpl(
|
|||
* @return A parsed adjustment float, or null if the adjustment had invalid formatting.
|
||||
*/
|
||||
private fun List<String>.parseReplayGainAdjustment() =
|
||||
first().replace(REPLAYGAIN_ADJUSTMENT_FILTER_REGEX, "").toFloatOrNull()?.nonZeroOrNull()
|
||||
first()
|
||||
.replace(REPLAYGAIN_ADJUSTMENT_FILTER_REGEX, "")
|
||||
.toFloatOrNull()
|
||||
?.nonZeroOrNull()
|
||||
|
||||
private companion object {
|
||||
val COMPILATION_ALBUM_ARTISTS = listOf("Various Artists")
|
||||
|
|
|
@ -55,7 +55,7 @@ fun Long.nonZeroOrNull() = if (this > 0) this else null
|
|||
*
|
||||
* @return The same number if it's non-zero, null otherwise.
|
||||
*/
|
||||
fun Float.nonZeroOrNull() = if (this > 0) this else null
|
||||
fun Float.nonZeroOrNull() = if (this != 0f) this else null
|
||||
|
||||
/**
|
||||
* Aliases a check to ensure a given value is in a specified range.
|
||||
|
|
Loading…
Reference in a new issue