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

Conversation

itsfolf
Copy link

@itsfolf itsfolf commented Dec 15, 2023

Proposed Changes

The Spotify connect addon currently does not support autoplay functionality, meaning it can't keep playing after a song/playlist is over. This PR adds this as an option.
Note that librespot autoplay is also quite unreliable at the moment (i.e. it does not work with singular songs), but it's the best we're getting until 0.5.0

@itsfolf
Copy link
Author

itsfolf commented Dec 15, 2023

Test logs
-----------------------------------------------------------
Add-on: Spotify Connect
Play Spotify music on your Home Assistant device
-----------------------------------------------------------
Add-on version: edge
You are running the latest version of this add-on.
System: Home Assistant OS 11.2  (amd64 / qemux86-64)
Home Assistant Core: 2023.12.1
Home Assistant Supervisor: 2023.11.6
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun spotifyd (no readiness notification)
[13:45:51] INFO: Starting the Spotify daemon...
s6-rc: info: service legacy-services successfully started
[2023-12-15T13:45:52Z INFO  librespot] librespot 0.4.2 UNKNOWN (Built on 2023-12-15, Build ID: zkYGpR6E, Profile: release)
[2023-12-15T13:46:14Z WARN  librespot_core::apresolve] Ignoring blacklisted access point ap-gue1.spotify.com:80
[2023-12-15T13:46:14Z INFO  librespot_core::session] Connecting to AP "ap-gew1.spotify.com:4070"
[2023-12-15T13:46:14Z INFO  librespot_core::session] Authenticated as "22letq7wmfdlr19856d5amorb" !
[2023-12-15T13:46:14Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2023-12-15T13:46:14Z INFO  librespot_core::session] Country: "BR"
[2023-12-15T13:46:14Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
[2023-12-15T13:46:14Z INFO  librespot_playback::audio_backend::pulseaudio] Using PulseAudioSink with format: S16
[2023-12-15T13:46:15Z INFO  librespot_connect::spirc] Fetching autoplay context uri
[2023-12-15T13:46:15Z INFO  librespot_connect::spirc] Autoplay uri resolved to <"spotify:station:playlist:37i9dQZF1E38KLmUbpQoNj">
[2023-12-15T13:46:15Z INFO  librespot_playback::player] Loading <Solid as a Stone> with Spotify URI <spotify:track:51F0lTuW3n4MZTbIg0PSzS>
[2023-12-15T13:46:15Z INFO  librespot_connect::spirc] Resolved 50 tracks from <"spotify:playlist:37i9dQZF1E38KLmUbpQoNj">
[2023-12-15T13:46:15Z INFO  librespot_playback::player] <Solid as a Stone> (161343 ms) loaded
[2023-12-15T13:47:43Z INFO  librespot_playback::player] Loading <Flaming Hot Cheetos> with Spotify URI <spotify:track:1F6IbA7di42uPc3cff8PXV>
[2023-12-15T13:47:43Z INFO  librespot_playback::player] <Flaming Hot Cheetos> (123884 ms) loaded
[2023-12-15T13:47:59Z INFO  librespot_connect::spirc] Fetching autoplay context uri
[2023-12-15T13:47:59Z INFO  librespot_connect::spirc] Autoplay uri resolved to <"spotify:station:playlist:37i9dQZF1E38KLmUbpQoNj">
[2023-12-15T13:47:59Z INFO  librespot_playback::player] Loading <Remembering Myself> with Spotify URI <spotify:track:1bxC2M337HfYDOr6Dx5rlW>
[2023-12-15T13:48:00Z INFO  librespot_playback::player] <Remembering Myself> (210074 ms) loaded
[2023-12-15T13:48:00Z INFO  librespot_connect::spirc] Resolved 50 tracks from <"spotify:playlist:37i9dQZF1E38KLmUbpQoNj">
[2023-12-15T13:48:02Z INFO  librespot_playback::player] Loading <Shut up My Moms Calling> with Spotify URI <spotify:track:3hxIUxnT27p5WcmjGUXNwx>
[2023-12-15T13:48:02Z INFO  librespot_playback::player] <Shut up My Moms Calling> (164571 ms) loaded
[2023-12-15T13:48:02Z INFO  librespot_connect::spirc] Resolved 50 tracks from <"spotify:playlist:37i9dQZF1E38KLmUbpQoNj">

spotify/config.yaml Outdated Show resolved Hide resolved
Co-authored-by: Jorim Tielemans <tielemans.jorim@gmail.com>
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jan 15, 2024
@itsfolf
Copy link
Author

itsfolf commented Jan 15, 2024

Bump?

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jan 16, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Feb 16, 2024
@tjorim tjorim added new-feature New features or options. and removed stale There has not been activity on this issue or PR for quite some time. labels Feb 16, 2024
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Mar 21, 2024
@tjorim tjorim added no-stale This issue or PR is exempted from the stable bot. and removed stale There has not been activity on this issue or PR for quite some time. labels Mar 21, 2024
@cvl01
Copy link

cvl01 commented Mar 27, 2024

@frenck Can you look at this and comment? Merging this feature would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New features or options. no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants