Skip to content

Commit

Permalink
all: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Jan 7, 2024
1 parent b6703a1 commit 5d5356e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ private constructor(private val cursor: Cursor, volumeManager: VolumeManager) :
val displayName = cursor.getString(displayNameIndex)
val volume = volumes.find { it.mediaStoreName == volumeName }
if (volume == null) {
logE("Could not find volume for $volumeName:$relativePath/$displayName [tried: ${volumes.map { it.mediaStoreName }}]")
logE(
"Could not find volume for $volumeName:$relativePath/$displayName [tried: ${volumes.map { it.mediaStoreName }}]")
return null
}
val components = Components.parseUnix(relativePath).child(displayName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ private class TagWorkerImpl(

// If this metadata is of a vorbis file, we actually need to extract it's base gain
// and divide it by 256 to get the gain in decibels.
if (format.sampleMimeType == MimeTypes.AUDIO_OPUS
&& format.initializationData.isNotEmpty()
&& format.initializationData[0].size >= 18) {
if (format.sampleMimeType == MimeTypes.AUDIO_OPUS &&
format.initializationData.isNotEmpty() &&
format.initializationData[0].size >= 18) {
val header = format.initializationData[0]
val gain = header[1].toInt() or ((header[0].toInt() shl 8) and 0xFF)
logD("Obtained opus base gain: ${gain / 256f} dB")
Expand All @@ -112,7 +112,6 @@ private class TagWorkerImpl(
rawSong.replayGainAlbumAdjustment =
rawSong.replayGainAlbumAdjustment?.plus(gain / 256f)
}

} else {
logD("No metadata could be extracted for ${rawSong.name}")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2017 Auxio Project
* SaneShuffleOrder.kt is part of Auxio.
* BetterShuffleOrder.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
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lbl_author_name"
android:text="@string/lbl_author"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

Expand Down

0 comments on commit 5d5356e

Please sign in to comment.