Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add librespot_options option #262

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions spotify/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ name: HomeAssistant
bitrate: 320
username: [email protected]
password: MySpotifyPassword
librespot_options: --volume-ctrl fixed --normalisation-pregain -9
```

**Note**: _This is just an example, don't copy and paste it! Create your own!_
Expand Down Expand Up @@ -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: `librespot_options`

Additional options for librespot. For more info see the [librespot documentation][librespot-options].

## Known issues and limitations

- This add-on requires a Spotify Premium account.
Expand Down Expand Up @@ -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-options]: https://github.com/librespot-org/librespot/wiki/Options
[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
1 change: 1 addition & 0 deletions spotify/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ schema:
bitrate: list(96|160|320)
username: str?
password: password?
librespot_options: str?
9 changes: 8 additions & 1 deletion spotify/rootfs/etc/services.d/spotifyd/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ declare bitrate
declare name
declare password
declare username
declare librespot_options

bashio::log.info 'Starting the Spotify daemon...'

Expand Down Expand Up @@ -37,5 +38,11 @@ if bashio::debug; then
options+=(--verbose)
fi

# Additional command line options
librespot_options=''
if bashio::config.has_value 'librespot_options'; then
librespot_options="$(bashio::config 'librespot_options')"
fi

# Run librespot
exec librespot "${options[@]}"
exec librespot "${options[@]}" $librespot_options
5 changes: 5 additions & 0 deletions spotify/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ configuration:
name: Spotify password
description: >-
The password to log into your Spotify Premium account with.
librespot_options:
name: Librespot options
description: >-
Additional options for librespot. For available options see:
https://github.com/librespot-org/librespot/wiki/Options.