playback: ignore zeroed replaygain tags
Ignore ReplayGain adjustments that are just 0 dB.
This commit is contained in:
parent
4ee20bc112
commit
0771a75b5a
2 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
- Disc number is no longer mis-aligned when no subtitle is present
|
||||
- Fixed selection not updating when playlists are changed
|
||||
- Fixed duplicate albums appearing in certain cases
|
||||
- Fixed ReplayGain adjustment not applying at the start of a song in certain cases
|
||||
|
||||
## 3.1.1
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.oxycblt.auxio.music.fs.toAudioUri
|
|||
import org.oxycblt.auxio.music.info.Date
|
||||
import org.oxycblt.auxio.util.logD
|
||||
import org.oxycblt.auxio.util.logW
|
||||
import org.oxycblt.auxio.util.nonZeroOrNull
|
||||
|
||||
/**
|
||||
* An processing abstraction over the [MetadataRetriever] and [TextTags] workflow that operates on
|
||||
|
@ -300,7 +301,7 @@ 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()
|
||||
first().replace(REPLAYGAIN_ADJUSTMENT_FILTER_REGEX, "").toFloatOrNull()?.nonZeroOrNull()
|
||||
|
||||
private companion object {
|
||||
val COMPILATION_ALBUM_ARTISTS = listOf("Various Artists")
|
||||
|
|
Loading…
Reference in a new issue