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

autoplay doesn't work #133

Closed
szygmunt opened this issue Nov 2, 2024 · 14 comments
Closed

autoplay doesn't work #133

szygmunt opened this issue Nov 2, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@szygmunt
Copy link

szygmunt commented Nov 2, 2024

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

@devgianlu
Copy link
Owner

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.

@szygmunt
Copy link
Author

szygmunt commented 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.

@devgianlu devgianlu added the bug Something isn't working label Nov 4, 2024
@devgianlu
Copy link
Owner

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?

@szygmunt
Copy link
Author

szygmunt commented 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.

@devgianlu
Copy link
Owner

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.

@szygmunt
Copy link
Author

szygmunt commented 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.

@devgianlu
Copy link
Owner

Done!

@szygmunt
Copy link
Author

szygmunt commented 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"

@devgianlu
Copy link
Owner

  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 08e546e, nasty little bug :)

@szygmunt
Copy link
Author

szygmunt commented 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.

@devgianlu
Copy link
Owner

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.

@szygmunt
Copy link
Author

szygmunt commented 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 08e546e 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).

@devgianlu
Copy link
Owner

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 #135, I broke something...

after 08e546e 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?

@szygmunt
Copy link
Author

szygmunt commented Nov 8, 2024

Can you open a separate issue for this too?

#137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants