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 autoplay option #254

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 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
autoplay: true
```

**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: `autoplay`

Whether Spotify should autoplay similar songs when reaching the end of the queue.

## Known issues and limitations

- This add-on requires a Spotify Premium account.
Expand Down
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?
autoplay: bool
6 changes: 6 additions & 0 deletions 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 autoplay

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

Expand All @@ -29,6 +30,11 @@ if bashio::config.has_value 'username'; then
options+=(--password "${password}")
fi

# Autoplay
if bashio::config.true 'autoplay'; then
options+=(--autoplay)
fi

# Save writes
options+=(--disable-audio-cache)

Expand Down
4 changes: 4 additions & 0 deletions spotify/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ configuration:
name: Spotify password
description: >-
The password to log into your Spotify Premium account with.
autoplay:
name: Autoplay
description: >-
Whether Spotify should autoplay similar songs at the end of the queue.