Reversing Spotify Connect Protocol
#16
does this work with a free spotify account? does this work with a windows pc?
Reply
#17
(2015-11-12, 09:30)Ed76 Wrote: does this work with a free spotify account? does this work with a windows pc?

No, but;
1) there is no libspotify_embedded.so for x86 architecture (that your windows PC would be running on). so you can't use the methods in this thread
2) You should be able to install spotify on your PC and log into your account, there is a "Connect" plugin for the PC App.
3) I don't know if that will work with a free account.. try it (and let us know). (I have a paid account..)
Reply
#18
i changed the parameters name a litle bit to follow the java standards..
and added some others..
you can see all the parameters here

i'm also creating an addon that shows up the information of scplayer on kodi..
that way other people can next, prev, pause without have to acess the webpage or your spotify account.. in a party for instance..
just grab the remote Wink
Reply
#19
Hi there!

Great work so far, I haven't been able to find something so close to what Spotify Connect offers. Props for that!

Yet, I'm currently having issues using Java on Openelec 6.0

I followed all instructions posted by user stevellion. Until I encountered the following:

Whenever I try:

Code:
OpenELEC:~ # ./jdk1.8.0_65/bin/java -jar SCPlayer.jar

it throws this error:

Code:
./jdk1.8.0_65/bin/java: line 6: syntax error: unexpected ")"

Am I missing a step?
Reply
#20
I just installed SCPlayer successfully, everything seems to work (it shows up in Spotify on PC and Android; I can press on play, and it shows up properly in the web panel on 192.168.178.35:4000, that it's playing) but I have no sound at all... Do I need to do something else other than just install it? I have the same problem with AirPlay form iPad Air 2 (my old iPad 2 didn't work either) to Kodi (iTunes AirPlay from Windows-10-PC somehow works, so do some(!) Android AirPlay apps).

I get this error:
Code:
2015-12-06 14:56:16 ERROR AudioPlayer:67 - onActive error
javax.sound.sampled.LineUnavailableException
        at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openImpl(PulseAudioMixer.java:714)
        at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:588)
        at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:584)
        at org.classpath.icedtea.pulseaudio.PulseAudioMixer.open(PulseAudioMixer.java:579)
        at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:94)
        at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:75)
        at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:90)
        at com.shuffle.scplayer.core.AudioPlayer.onActive(AudioPlayer.java:62)
        at com.shuffle.scplayer.core.AudioPlayer.onPlay(AudioPlayer.java:81)
        at com.shuffle.scplayer.core.SpotifyConnectPlayerImpl$5.apply(SpotifyConnectPlayerImpl.java:190)
        at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:485)
        at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:515)
        at com.sun.jna.Native.invokeInt(Native Method)
        at com.sun.jna.Function.invoke(Function.java:390)
        at com.sun.jna.Function.invoke(Function.java:323)
        at com.sun.jna.Library$Handler.invoke(Library.java:236)
        at com.sun.proxy.$Proxy0.SpPumpEvents(Unknown Source)
        at com.shuffle.scplayer.core.SpotifyConnectPlayerImpl$1.run(SpotifyConnectPlayerImpl.java:118)
        at java.lang.Thread.run(Thread.java:745)
Reply
#21
(2015-11-21, 19:27)jijsselstijn Wrote: Hi there!

Great work so far, I haven't been able to find something so close to what Spotify Connect offers. Props for that!

Yet, I'm currently having issues using Java on Openelec 6.0

I followed all instructions posted by user stevellion. Until I encountered the following:

Whenever I try:

Code:
OpenELEC:~ # ./jdk1.8.0_65/bin/java -jar SCPlayer.jar

it throws this error:

Code:
./jdk1.8.0_65/bin/java: line 6: syntax error: unexpected ")"

Am I missing a step?

I'm getting this too. Would this have anything to do with the fact that I didn't place everything on the /storage folder?
Reply
#22
sorry, forgot to subscribe the thread..
the error is because you downloaded arm64 of java.. you have to download arm32..
Reply
#23
Works great for me. Thank you very much
Reply
#24
HI
i've got OE 6.0.1 on my rpi2.

everything works fine, (webgui OK, SCPlayer can be listed in my other connect devices, and can listen music on it. but at the start i got these exceptions:

OpenELEC:~ # ./jdk1.8.0_73/bin/java -jar SCPlayer.jar
2016-02-21 20:00:45 WARN ZeroConfServiceAvahiBin:22 - Avahibin error. Zero conf authentication will not be available
java.io.IOException: Cannot run program "avahi-publish": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at com.shuffle.scplayer.core.zeroconf.ZeroConfServiceAvahiBin$1.run(ZeroConfServiceAvahiBin.java:20)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 5 more


could you help with this? and ofc, when i close my ssh client off. it stops running :(
zeroconf is enabled

btw thanks for the efforts.
it works fine. except this thing.
Reply
#25
Hi,

can anybody explain me if this is working on a odroid u3 with openelec too?

Thank you for the Info...

Greetings Elluminatus
Reply
#26
This seems to be only for ARM based devices, ive got an intel X64 nuc. Will SCplayer run on that although it's made for ARM? I understand that i have to install a non -arm version of Java etc, and since SCplayer is java, i guess it could still work?
Reply
#27
Amazing script!! Working wonderfully on OSMC.
I wonder if you ever created that addon for displaying the info and controls on Kodi? That would seal it as perfect!!

Thank you!!
Reply
#28
Hello, I am new to KODI (using it on an Raspberry Pi 2B with OpenElec) and would love to use Spotify Connect on it. Is there a super detailed fool proof manual how to install this on my Pi so I won't screw it up?
Thanks in advance!
Reply
#29
Yes there is. On the first page a user poster a detailed step by step how to. 2 things you have to consider: download the 32bit version of java instead of the 64bit as he says.

Quote:Installing SCPlayer is straightforward.. https://github.com/crsmoro/scplayer/tree/master

Download the latest jdk from the link. You need jdk-8u65-linux-arm64-vfp-hflt.tar.gz
Gunzip it on your laptop/PC and then sftp it onto your Pi
ssh onto your Pi and "tar xvf jdk-8u65-linux-arm64-vfp-hflt"
This will create you a jdk1.8.0_65 directory
"wget https://github.com/crsmoro/scplayer/raw/...Player.jar"
"wget https://github.com/sashahilton00/spotify..._shared.so"
You also need to create the API Key.. follow the instructions and then either wget it or sftp onto your Pi.
On OpenElec, also need to run this command: "echo snd_bcm2835 >> /storage/.config/modules-load.d/audio.conf"
then type "reboot" and once available, ssh in again

Then run ./jdk1.8.0_65/bin/java -jar SCPlayer.jar - then go look at your Pi's Address:4000
That should let you log in and test: It should show up on your other Spotify devices/Mac/PC etc and you should be able to play to it.
once you've tested that. remove the file credentials.json (maybe don't need to do this always) and then run in silent mode.
./jdk1.8.0_65/bin/java -Dusername=[spotifyusername] -Dpassword=[spotifypassword] -DplayerName=[name for the player] -Dstandalone=true &

That will run it in background and you then should be able to play to it from your other Spotify devices.

Then you should run it on startup with Openelec, I do not remember how it is done in OE, but here it is how to do it on OSMC, basically adding a system service: https://github.com/crsmoro/scplayer/issues/20 If you look for the couchpotato guide in osmc forums they tell you step by step how to add a system service.

It is not so easy and foolproof but not so difficult either Smile
Hope it helps.
Reply

Logout Mark Read Team Forum Stats Members Help
Reversing Spotify Connect Protocol0