diff --git a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt index 99252534..cdab64fa 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt +++ b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt @@ -31,6 +31,7 @@ object Preferences { private const val PODCAST_SECTION_VISIBILITY = "podcast_section_visibility" private const val RADIO_SECTION_VISIBILITY = "radio_section_visibility" private const val MUSIC_DIRECTORY_SECTION_VISIBILITY = "music_directory_section_visibility" + private const val REPLAY_GAIN_MODE = "replay_gain_mode" @JvmStatic fun getServer(): String? { @@ -246,4 +247,9 @@ object Preferences { fun isMusicDirectorySectionVisible(): Boolean { return App.getInstance().preferences.getBoolean(MUSIC_DIRECTORY_SECTION_VISIBILITY, true) } + + @JvmStatic + fun getReplayGainMode(): String? { + return App.getInstance().preferences.getString(REPLAY_GAIN_MODE, "disabled") + } } \ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 1f40abac..f6cebaa1 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -141,4 +141,15 @@ 12 6 + + + Disabled + Track preferred + Album preferred + + + disabled + track + album + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ab6f1f6e..60264c28 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -194,11 +194,13 @@ If enabled, show the podcast section. Show radio If enabled, show the radio section. + Set replay gain mode Rounded corners If enabled, sets a curvature angle for all rendered covers. The changes will take effect on restart. Corners size Sets the magnitude of the curvature angle. Scan library + Replay gain is a feature that allows you to adjust the volume level of audio tracks for a consistent listening experience. This setting is only effective if the track contains the necessary metadata. Returns the state of the play queue for this user. This includes the tracks in the play queue, the currently playing track, and the position within this track. The server must support this feature. Priority given to the transcoding mode. If set to \"Direct play\" the bitrate of the file will not be changed. If enabled, starred tracks will be downloaded for offline use. @@ -206,6 +208,7 @@ Theme Data General + Replay Gain Syncing Transcoding UI diff --git a/app/src/main/res/xml/global_preferences.xml b/app/src/main/res/xml/global_preferences.xml index 9b3d8ad0..c737e51c 100644 --- a/app/src/main/res/xml/global_preferences.xml +++ b/app/src/main/res/xml/global_preferences.xml @@ -139,6 +139,22 @@ app:useSimpleSummaryProvider="true" /> + + + + + + +