musikr: parse APE tags on mpeg files, log ReplayGain values in debug
This commit is contained in:
@@ -23,6 +23,7 @@ import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import java.util.UUID
|
||||
import javax.inject.Inject
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import org.oxycblt.auxio.BuildConfig
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -411,6 +412,15 @@ constructor(
|
||||
val start = System.currentTimeMillis()
|
||||
val result = Musikr.new(context, config).run(::emitIndexingProgress)
|
||||
L.d("Index finished in ${System.currentTimeMillis() - start}ms")
|
||||
if (BuildConfig.DEBUG) {
|
||||
// Surface parsed ReplayGain values for logcat verification.
|
||||
for (song in result.library.songs) {
|
||||
val rg = song.replayGainAdjustment
|
||||
if (rg.track != null || rg.album != null) {
|
||||
L.d("RG: ${song.name.raw} track=${rg.track} album=${rg.album}")
|
||||
}
|
||||
}
|
||||
}
|
||||
// Music loading completed, update the revision right now so we re-use this work
|
||||
// later.
|
||||
L.d("Revisioning from $currentRevision -> $newRevision")
|
||||
|
||||
Reference in New Issue
Block a user