From 5d5356e46e4c30fb2ffecabf59017d4b624358d3 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 6 Jan 2024 21:02:40 -0700 Subject: [PATCH] all: cleanup --- .../oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt | 3 ++- .../java/org/oxycblt/auxio/music/metadata/TagWorker.kt | 7 +++---- .../oxycblt/auxio/playback/system/BetterShuffleOrder.kt | 2 +- app/src/main/res/layout/fragment_about.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt index 3a0e8b138..23e58c80d 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStorePathInterpreter.kt @@ -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) diff --git a/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt b/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt index 5b3d8fa51..6a5880f7d 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/metadata/TagWorker.kt @@ -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") @@ -112,7 +112,6 @@ private class TagWorkerImpl( rawSong.replayGainAlbumAdjustment = rawSong.replayGainAlbumAdjustment?.plus(gain / 256f) } - } else { logD("No metadata could be extracted for ${rawSong.name}") } diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/BetterShuffleOrder.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/BetterShuffleOrder.kt index 058524522..233e490c3 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/BetterShuffleOrder.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/BetterShuffleOrder.kt @@ -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 diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 1723aafe3..1088aff21 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -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" />