[GH-ISSUE #133] autoplay doesn't work #82

Closed
opened 2026-02-28 14:25:12 +03:00 by kerem · 14 comments
Owner

Originally created by @szygmunt on GitHub (Nov 2, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/133

Doesn't matter "autoplay" slider position in android app i have always "DEBU[0001] autoplay enabled: false". Or maybe is some configuration option in config.yml file to enable this feature?
edited:
when i toggle "autoplay" slider in android app while i'm connected to go-librespot i get this in logs:
DEBU[0543] skipping dealer message uri="spotify:user:attributes:mutated" DEBU[0543] skipping packet PacketTypeMercuryEvent, len: 121

Originally created by @szygmunt on GitHub (Nov 2, 2024). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/133 Doesn't matter "autoplay" slider position in android app i have always "DEBU[0001] autoplay enabled: false". Or maybe is some configuration option in config.yml file to enable this feature? edited: when i toggle "autoplay" slider in android app while i'm connected to go-librespot i get this in logs: `DEBU[0543] skipping dealer message uri="spotify:user:attributes:mutated" DEBU[0543] skipping packet PacketTypeMercuryEvent, len: 121 `
kerem 2026-02-28 14:25:12 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@devgianlu commented on GitHub (Nov 3, 2024):

It is currently not possibile to update the autoplay value when go-librespot is running (this is the same for the desktop clients). If you restart go-librespot after changing the autoplay settings, the logs should report the correct value.

<!-- gh-comment-id:2453418556 --> @devgianlu commented on GitHub (Nov 3, 2024): It is currently not possibile to update the autoplay value when go-librespot is running (this is the same for the desktop clients). If you restart go-librespot after changing the autoplay settings, the logs should report the correct value.
Author
Owner

@szygmunt commented on GitHub (Nov 3, 2024):

It is currently not possibile to update the autoplay value when go-librespot is running (this is the same for the desktop clients).

Yes i know. I saw #57. But i mean that slider position in my android app doesnt affect to go-librespot (autoplay in logs is always autoplay enabled: false)

If you restart go-librespot after changing the autoplay settings, the logs should report the correct value.

It should't for me. Tested only with app on my android mobile.

<!-- gh-comment-id:2453564867 --> @szygmunt commented on GitHub (Nov 3, 2024): > It is currently not possibile to update the autoplay value when go-librespot is running (this is the same for the desktop clients). Yes i know. I saw #57. But i mean that slider position in my android app doesnt affect to go-librespot (autoplay in logs is always `autoplay enabled: false`) > If you restart go-librespot after changing the autoplay settings, the logs should report the correct value. It should't for me. Tested only with app on my android mobile.
Author
Owner

@devgianlu commented on GitHub (Nov 4, 2024):

Just tested from Android and it seems to work for me. Can you try using the desktop app to toggle? Are you connecting via zeroconf or interactive?

<!-- gh-comment-id:2454489585 --> @devgianlu commented on GitHub (Nov 4, 2024): Just tested from Android and it seems to work for me. Can you try using the desktop app to toggle? Are you connecting via zeroconf or interactive?
Author
Owner

@szygmunt commented on GitHub (Nov 4, 2024):

I did some tests and i think it work in different way i thought before. I had two "machine" in the same network with native android apps on it: on my android mobile and linux desktop. Autoplay works only when slider on target machine is ON (slider position on source machine when connect to target using "spotify connect" isn't important). So i think go-librespot have to get "slider" in config.yml.

<!-- gh-comment-id:2455737608 --> @szygmunt commented on GitHub (Nov 4, 2024): I did some tests and i think it work in different way i thought before. I had two "machine" in the same network with native android apps on it: on my android mobile and linux desktop. Autoplay works only when slider on target machine is ON (slider position on source machine when connect to target using "spotify connect" isn't important). So i think go-librespot have to get "slider" in config.yml.
Author
Owner

@devgianlu commented on GitHub (Nov 5, 2024):

So it appers that autoplay is not an account setting, but a device setting? In that case it would make sense to have it in the configuration of go-librespot.

<!-- gh-comment-id:2456741732 --> @devgianlu commented on GitHub (Nov 5, 2024): So it appers that autoplay is not an account setting, but a device setting? In that case it would make sense to have it in the configuration of go-librespot.
Author
Owner

@szygmunt commented on GitHub (Nov 5, 2024):

So it appers that autoplay is not an account setting, but a device setting?

Yes, i think so. Maybe someone can confirm that for sure.

In that case it would make sense to have it in the configuration of go-librespot.

Before i used raspotify and rememer that was option in config for enable/disable autoplay.
I'll be very happy to test it when it will be ready.

<!-- gh-comment-id:2456972730 --> @szygmunt commented on GitHub (Nov 5, 2024): > So it appers that autoplay is not an account setting, but a device setting? Yes, i think so. Maybe someone can confirm that for sure. > In that case it would make sense to have it in the configuration of go-librespot. Before i used raspotify and rememer that was option in config for enable/disable autoplay. I'll be very happy to test it when it will be ready.
Author
Owner

@devgianlu commented on GitHub (Nov 5, 2024):

Done!

<!-- gh-comment-id:2457868207 --> @devgianlu commented on GitHub (Nov 5, 2024): Done!
Author
Owner

@szygmunt commented on GitHub (Nov 5, 2024):

It almost work but have got some problems:
Playing only single track finding using "search" in spotify:

  1. Android app - music is playing like always but on the end of track nothing is loading to queue and logs say:
    WARN[0217] failed resolving station for spotify:search error="invalid status code from context resolve autoplay: 204"
    When track is starting go-librespot doesn't resolv context of track in proper way:
    DEBU[0039] resolved context of track uri="spotify:search" ` - missing uri?
  2. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa. In logs it seems like this:

Start playing first track:
DEBU[0417] resolved context of track uri="spotify:track:7B6Hw8SyK6JnFoL1GaCeGf"

Problem with playing first track from newly created playlist:

DEBU[0508] resolved autoplay station: spotify:station:track:7B6Hw8SyK6JnFoL1GaCeGf 
DEBU[0508] resolved context of track                     uri="spotify:station:track:7B6Hw8SyK6JnFoL1GaCeGf"
DEBU[0508] loading track (paused: false, position: 0ms)  uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6"
DEBU[0508] put connect state because PLAYER_STATE_CHANGED 
DEBU[0508] selected format OGG_VORBIS_320 (67f1c0188d3f4db34584322c60ea0163bb9b6b66)  uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6"
DEBU[0508] requested aes key for file 67f1c0188d3f4db34584322c60ea0163bb9b6b66, gid: 6jGFzqqW8VBBf4oLhnP4A6 
DEBU[0508] fetched first chunk of 19, total size is 9619512 bytes  uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6"
INFO[0508] loaded track "Tamagotchi" (paused: false, position: 0ms, duration: 201829ms, prefetched: false)  uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6"
DEBU[0509] put connect state because PLAYER_STATE_CHANGED 
WARN[0509] failed getting output device delay            error="ALSA error at snd_pcm_delay: Broken pipe"
<!-- gh-comment-id:2458096786 --> @szygmunt commented on GitHub (Nov 5, 2024): It almost work but have got some problems: Playing only single track finding using "search" in spotify: 1. Android app - music is playing like always but on the end of track nothing is loading to queue and logs say: `WARN[0217] failed resolving station for spotify:search error="invalid status code from context resolve autoplay: 204"` When track is starting go-librespot doesn't resolv context of track in proper way: `DEBU[0039]` resolved context of track uri="spotify:search" ` - missing uri? 2. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa. In logs it seems like this: Start playing first track: `DEBU[0417] resolved context of track uri="spotify:track:7B6Hw8SyK6JnFoL1GaCeGf"` Problem with playing first track from newly created playlist: ``` DEBU[0508] resolved autoplay station: spotify:station:track:7B6Hw8SyK6JnFoL1GaCeGf DEBU[0508] resolved context of track uri="spotify:station:track:7B6Hw8SyK6JnFoL1GaCeGf" DEBU[0508] loading track (paused: false, position: 0ms) uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6" DEBU[0508] put connect state because PLAYER_STATE_CHANGED DEBU[0508] selected format OGG_VORBIS_320 (67f1c0188d3f4db34584322c60ea0163bb9b6b66) uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6" DEBU[0508] requested aes key for file 67f1c0188d3f4db34584322c60ea0163bb9b6b66, gid: 6jGFzqqW8VBBf4oLhnP4A6 DEBU[0508] fetched first chunk of 19, total size is 9619512 bytes uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6" INFO[0508] loaded track "Tamagotchi" (paused: false, position: 0ms, duration: 201829ms, prefetched: false) uri="spotify:track:6jGFzqqW8VBBf4oLhnP4A6" DEBU[0509] put connect state because PLAYER_STATE_CHANGED WARN[0509] failed getting output device delay error="ALSA error at snd_pcm_delay: Broken pipe" ```
Author
Owner

@devgianlu commented on GitHub (Nov 6, 2024):

  1. Android app - music is playing like always but on the end of track nothing is loading to queue

Can you open a separate issue for this? This may be inteded if Spotify does not support autoplay from search results.

  1. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa.

Should be fixed with github.com/devgianlu/go-librespot@08e546e495, nasty little bug :)

<!-- gh-comment-id:2459440290 --> @devgianlu commented on GitHub (Nov 6, 2024): > 1. Android app - music is playing like always but on the end of track nothing is loading to queue Can you open a separate issue for this? This may be inteded if Spotify does not support autoplay from search results. > 2. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa. Should be fixed with https://github.com/devgianlu/go-librespot/commit/08e546e4953b29afdc5b2753f37e79748db4aa17, nasty little bug :)
Author
Owner

@szygmunt commented on GitHub (Nov 6, 2024):

Sorry for comment in closed thread but...

  1. Android app - music is playing like always but on the end of track nothing is loading to queue

Can you open a separate issue for this? This may be inteded if Spotify does not support autoplay from search results.

I'll do some more test with android and will open.

  1. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa.

Should be fixed with 08e546e, nasty little bug :)

Yes, now is perfect. I have only one question/problem. Is it normal when i get error like this:

ERRO[4255] failed fetching next tracks error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:track:70X7swUO33mrChUj4JSnbW?salt=345682&autoplay=true&count=50&isVideo=false&prev_tracks=5WWK07aVRFrnOhcYw3jOHl,5DLmRrqLyjVHhOkXa05Vtz,7wg60oyA8mWpKvJ1RsNQeV,0FGBCrLj15yxjJ1WPRnVMQ,2AbDY2agHP7e5slykeHPxJ,2yta07TETX5RGOpp12Kal8,5kruxMsxFfAadntmuoDVTj,4aA0qqyR2w9hpxYcHASxlT,3lOmInQxDnecxjn9mkCDRd,65Islxiuhti81Mep299R0I,7wYVm3OFsQvR8o8UwPoxQ0,702sdcjH1JbU2hwK8xEJD6,3xda00PJhL4k22ZF128QiL,7kXg41pCrpFulNrU7tK69Y,6qBBQTa27IJAsz3nGxTm7p,4oLgclTNif24XEFC7O7we4,405oT48J84IgtbWVDsCODc,1PGfufH63EaaMVxu8ik0qZ,12OV9e97TVkKb33cPqVSOj,318KZH2O4R003o3hL1aDqS,0m0MNn28t3VYGpzQd3PHuw,3W2UqSFjZt3bodeSTwFT8o,5E3fl4qohyr9LfS8xPimgV,4asWH98MYw0pdaCMc8sXI6,4xdzAOB3baQ8VmPJ8cf3ij,1rD0BmlixRov9u1zPGFpZu,0ECGOpzz0JKno4wjTWCui8,4srUcUkIP3NejBuRvQz3Gv,5nDtyyEmU26FJl77XLzNkV,7fYmDKSydjDrY4LWRSvAzf,633WGcoYmJrMCozV8Hssdh,5dk1wOmZVukUhwl5kKr7aS,18sM7A95jQugA982HWRJoe,4eG1ODcdjySLxlB9dtmbiv,3YQjwJ6JFqE588ZOXRmKLl,1WYcxUfqJmmmduS7F6qImy,1ZqHxSsl7BAWsw6G0lvZJJ,5SeCzfPjdei1yqoSVtppFF,0yLYTwDxdJGbyfgNwxd3ec,5RJc7zSyxLC6rbPGkQKoCl,5p7umW7hZRTMEoUZgSmz7a,143zd3DGXoJI7sHlrJlSVn,5W5l9ysNngpGz2J4xK8Rsa,1kAb8sDgCY43mRRw8lskmp,3Wmi9Qmtgp8nuS14qneAqi,4L2RcmaSgKr0Z1MVcVuA24,3YsjJZc6HgHAU2tAKl2uKL,6SGkgm9OEhK898PeaxLViI,675FZ1NEbcwiCO9vHoiQpu,04kSSveBKXiNeRaOXu2iog,70X7swUO33mrChUj4JSnbW&minimal=true: 502"?

It apears in logs after few tracks from newly created playlist was allready played and after that is duplicate each time new song from playlist is loading.

<!-- gh-comment-id:2460001572 --> @szygmunt commented on GitHub (Nov 6, 2024): Sorry for comment in closed thread but... > > 1. Android app - music is playing like always but on the end of track nothing is loading to queue > > Can you open a separate issue for this? This may be inteded if Spotify does not support autoplay from search results. I'll do some more test with android and will open. > > 2. Desktop app (linux) - on the end of track queue is loading with bunch of new tracks, first track from newly created queue is loading but not playing cause some problem with alsa. > > Should be fixed with [08e546e](https://github.com/devgianlu/go-librespot/commit/08e546e4953b29afdc5b2753f37e79748db4aa17), nasty little bug :) Yes, now is perfect. I have only one question/problem. Is it normal when i get error like this: `ERRO[4255] failed fetching next tracks error="failed moving to next index 50 (page 1): failed fetching next page: invalid status code from page at radio-apollo/v3/tracks/spotify:station:track:70X7swUO33mrChUj4JSnbW?salt=345682&autoplay=true&count=50&isVideo=false&prev_tracks=5WWK07aVRFrnOhcYw3jOHl,5DLmRrqLyjVHhOkXa05Vtz,7wg60oyA8mWpKvJ1RsNQeV,0FGBCrLj15yxjJ1WPRnVMQ,2AbDY2agHP7e5slykeHPxJ,2yta07TETX5RGOpp12Kal8,5kruxMsxFfAadntmuoDVTj,4aA0qqyR2w9hpxYcHASxlT,3lOmInQxDnecxjn9mkCDRd,65Islxiuhti81Mep299R0I,7wYVm3OFsQvR8o8UwPoxQ0,702sdcjH1JbU2hwK8xEJD6,3xda00PJhL4k22ZF128QiL,7kXg41pCrpFulNrU7tK69Y,6qBBQTa27IJAsz3nGxTm7p,4oLgclTNif24XEFC7O7we4,405oT48J84IgtbWVDsCODc,1PGfufH63EaaMVxu8ik0qZ,12OV9e97TVkKb33cPqVSOj,318KZH2O4R003o3hL1aDqS,0m0MNn28t3VYGpzQd3PHuw,3W2UqSFjZt3bodeSTwFT8o,5E3fl4qohyr9LfS8xPimgV,4asWH98MYw0pdaCMc8sXI6,4xdzAOB3baQ8VmPJ8cf3ij,1rD0BmlixRov9u1zPGFpZu,0ECGOpzz0JKno4wjTWCui8,4srUcUkIP3NejBuRvQz3Gv,5nDtyyEmU26FJl77XLzNkV,7fYmDKSydjDrY4LWRSvAzf,633WGcoYmJrMCozV8Hssdh,5dk1wOmZVukUhwl5kKr7aS,18sM7A95jQugA982HWRJoe,4eG1ODcdjySLxlB9dtmbiv,3YQjwJ6JFqE588ZOXRmKLl,1WYcxUfqJmmmduS7F6qImy,1ZqHxSsl7BAWsw6G0lvZJJ,5SeCzfPjdei1yqoSVtppFF,0yLYTwDxdJGbyfgNwxd3ec,5RJc7zSyxLC6rbPGkQKoCl,5p7umW7hZRTMEoUZgSmz7a,143zd3DGXoJI7sHlrJlSVn,5W5l9ysNngpGz2J4xK8Rsa,1kAb8sDgCY43mRRw8lskmp,3Wmi9Qmtgp8nuS14qneAqi,4L2RcmaSgKr0Z1MVcVuA24,3YsjJZc6HgHAU2tAKl2uKL,6SGkgm9OEhK898PeaxLViI,675FZ1NEbcwiCO9vHoiQpu,04kSSveBKXiNeRaOXu2iog,70X7swUO33mrChUj4JSnbW&minimal=true: 502"`? It apears in logs after few tracks from newly created playlist was allready played and after that is duplicate each time new song from playlist is loading.
Author
Owner

@devgianlu commented on GitHub (Nov 6, 2024):

It apears in logs after few tracks from newly created playlist was allready played and after that is duplicate each time new song from playlist is loading.

Does it happen everytime or just sometimes? 502 should be a temporary error from Spotify side, but worth investigating if it always does this.

<!-- gh-comment-id:2460432578 --> @devgianlu commented on GitHub (Nov 6, 2024): > It apears in logs after few tracks from newly created playlist was allready played and after that is duplicate each time new song from playlist is loading. Does it happen everytime or just sometimes? 502 should be a temporary error from Spotify side, but worth investigating if it always does this.
Author
Owner

@szygmunt commented on GitHub (Nov 7, 2024):

It happens everytime (but as i say, after few songs, don't know how many exactly).
Additionally is some problem with play/pause songs playing from autogenerated playlist, exactly i can't resume track and have to skip to next or prev to unblock sound at all.
About android app:
after github.com/devgianlu/go-librespot@08e546e495 autoplay is working but playlist icon is inactive and you can't check track's list and skip to any specified track (only skip to prev/next).

<!-- gh-comment-id:2463035263 --> @szygmunt commented on GitHub (Nov 7, 2024): It happens everytime (but as i say, after few songs, don't know how many exactly). Additionally is some problem with play/pause songs playing from autogenerated playlist, exactly i can't resume track and have to skip to next or prev to unblock sound at all. About android app: after https://github.com/devgianlu/go-librespot/commit/08e546e4953b29afdc5b2753f37e79748db4aa17 autoplay is working but playlist icon is inactive and you can't check track's list and skip to any specified track (only skip to prev/next).
Author
Owner

@devgianlu commented on GitHub (Nov 8, 2024):

Additionally is some problem with play/pause songs playing from autogenerated playlist, exactly i can't resume track and have to skip to next or prev to unblock sound at all.

This is being tracked as https://github.com/devgianlu/go-librespot/issues/135, I broke something...

after github.com/devgianlu/go-librespot@08e546e495 autoplay is working but playlist icon is inactive and you can't check track's list and skip to any specified track (only skip to prev/next).

Can you open a separate issue for this too?

<!-- gh-comment-id:2464725238 --> @devgianlu commented on GitHub (Nov 8, 2024): > Additionally is some problem with play/pause songs playing from autogenerated playlist, exactly i can't resume track and have to skip to next or prev to unblock sound at all. This is being tracked as https://github.com/devgianlu/go-librespot/issues/135, I broke something... > after https://github.com/devgianlu/go-librespot/commit/08e546e4953b29afdc5b2753f37e79748db4aa17 autoplay is working but playlist icon is inactive and you can't check track's list and skip to any specified track (only skip to prev/next). Can you open a separate issue for this too?
Author
Owner

@szygmunt commented on GitHub (Nov 8, 2024):

Can you open a separate issue for this too?

#137

<!-- gh-comment-id:2465360064 --> @szygmunt commented on GitHub (Nov 8, 2024): > Can you open a separate issue for this too? #137
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#82
No description provided.