diff --git a/spotify/DOCS.md b/spotify/DOCS.md index a363e63..b1dd356 100644 --- a/spotify/DOCS.md +++ b/spotify/DOCS.md @@ -37,6 +37,7 @@ name: HomeAssistant bitrate: 320 username: frenck@example.com password: MySpotifyPassword +enable_volume_normalisation: false ``` **Note**: _This is just an example, don't copy and paste it! Create your own!_ @@ -88,6 +89,10 @@ to disallow guests on your network to use the add-on. The password you use to login to your Spotify Premium account. +### Option: `enable_volume_normalisation` + +Whether to enable volume normalisation. For more info see the [librespot documentation][librespot-volume-normalisation]. + ## Known issues and limitations - This add-on requires a Spotify Premium account. @@ -159,6 +164,7 @@ SOFTWARE. [forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-spotify-connect/61210?u=frenck [frenck]: https://github.com/frenck [issue]: https://github.com/hassio-addons/addon-spotify-connect/issues +[librespot-volume-normalisation]: https://github.com/librespot-org/librespot/wiki/Options#volume-normalisation [reddit]: https://reddit.com/r/homeassistant [releases]: https://github.com/hassio-addons/addon-spotify-connect/releases [semver]: http://semver.org/spec/v2.0.0.htm diff --git a/spotify/config.yaml b/spotify/config.yaml index d0a4528..902388c 100644 --- a/spotify/config.yaml +++ b/spotify/config.yaml @@ -21,3 +21,4 @@ schema: bitrate: list(96|160|320) username: str? password: password? + enable_volume_normalisation: bool? diff --git a/spotify/rootfs/etc/services.d/spotifyd/run b/spotify/rootfs/etc/services.d/spotifyd/run index e77f9a4..529ae78 100755 --- a/spotify/rootfs/etc/services.d/spotifyd/run +++ b/spotify/rootfs/etc/services.d/spotifyd/run @@ -29,6 +29,11 @@ if bashio::config.has_value 'username'; then options+=(--password "${password}") fi +# Volume Normalisation +if bashio::config.true 'enable_volume_normalisation'; then + options+=(--enable-volume-normalisation) +fi + # Save writes options+=(--disable-audio-cache) diff --git a/spotify/translations/en.yaml b/spotify/translations/en.yaml index 94e5b72..4c9eca5 100644 --- a/spotify/translations/en.yaml +++ b/spotify/translations/en.yaml @@ -23,3 +23,7 @@ configuration: name: Spotify password description: >- The password to log into your Spotify Premium account with. + enable_volume_normalisation: + name: Enable volume normalisation + description: >- + Whether to enable volume normalisation.