joshuathompson / baton

CLI to manage Spotify playback
MIT License
200 stars 12 forks source link

Transfer to device does not happen #13

Closed dangerfish96 closed 5 years ago

dangerfish96 commented 6 years ago

I have set up a raspberry pi with raspotify and it is recognized by baton devices. But baton transfer <id> does not do anything.

joshuathompson commented 6 years ago

Hey @dangerfish96, thanks for the ticket. Do you get an error saying that there was a failure to transfer playback or does it act like it happened successfully?

I'm able to switch between my phone and PC. Can you try another device if you're able?

dangerfish96 commented 6 years ago

It says the transfer is successfull. And it‘s only with this device/ raspotify. If music is already playing with raspotify it is transferable to another device. It is also possible to transfer it to raspotify from spotify itself

christopher-dG commented 6 years ago

This is happening to me too when transferring from my phone to spotifyd. However the other way around from spotifyd to phone works.

Also transfered should be spelled transferred :sweat_smile:

dangerfish96 commented 5 years ago

Here is the output of strace: https://pastebin.com/E5FN9NTd

dangerfish96 commented 5 years ago

The Spotify has an api endpoint for transfering devices. It uses device_ids instead of device_id which is used in baton. Thats why it does not work.

dangerfish96 commented 5 years ago

I made a small workaround that fixes the transfer issue. But I don't know how to code in golang, so...

https://pastebin.com/SzfxM1u9

joshuathompson commented 5 years ago

@dangerfish96 I just tried my hand at fixing it using the information you gave me. Grab the new version and let me know if that works for you.

Also fixed the typo @christopher-dG brought up 😅

christopher-dG commented 5 years ago

It's working on my end! This is really huge for me, I can finally drop the desktop app. Thank you so much!

joshuathompson commented 5 years ago

Awesome! Happy to close this for now. Feel free to reopen.