Kodi Community Forum
Beta Spotify for Kodi - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
+---- Thread: Beta Spotify for Kodi (/showthread.php?tid=265356)



RE: Spotify for Kodi - John01nl - 2017-06-15

(2017-06-15, 15:38)marcelveldt Wrote:
(2017-06-15, 15:23)John01nl Wrote: I am running your spotify plugin 1.1.20 straight from your repository.
When Iog in and try to play a song, either if it's in the playlist section or by search... i doesn't play locally.
When I turn on my laptop on the same network and start spotify, it recognizes the laptop and plays the music fine on the laptop through spotify connect.
But playing locally doesn't seem to be possible.
What can I do?


Provide me your Kodi log file ?


Verzonden vanaf mijn iPhone met Tapatalk

Ofcourse... Here it is:

http://sprunge.us/jBGd

For your information, I am running libreelec 8.0.2 and kodi 17.3

Thank you in advance for having a look at it.


RE: Spotify for Kodi - sadanyac - 2017-06-15

Hi!

Raspberry Pi 3 with LibreELEC 8.0.2.

I've update the plugin to 1.1.20 setting again user and password. I've authorized with other kodi installation (on Windows 10) plugin.audio.spotify to connect to the service but still showing the same message "The default browser should now be opened, follow the directions to authorize this app on spotify". There's not default browser on Kodi for Rapsberry Pi.

How can I set the app is already authorized?

Thanks in advance!


RE: Spotify for Kodi - John01nl - 2017-06-15

(2017-06-15, 15:51)John01nl Wrote:
(2017-06-15, 15:38)marcelveldt Wrote:
(2017-06-15, 15:23)John01nl Wrote: I am running your spotify plugin 1.1.20 straight from your repository.
When Iog in and try to play a song, either if it's in the playlist section or by search... i doesn't play locally.
When I turn on my laptop on the same network and start spotify, it recognizes the laptop and plays the music fine on the laptop through spotify connect.
But playing locally doesn't seem to be possible.
What can I do?


Provide me your Kodi log file ?


Verzonden vanaf mijn iPhone met Tapatalk

Ofcourse... Here it is:

http://sprunge.us/jBGd

For your information, I am running libreelec 8.0.2 and kodi 17.3

Thank you in advance for having a look at it.

This one is probably better... has debug logs...
http://sprunge.us/feIF


RE: Spotify for Kodi - sadanyac - 2017-06-15

(2017-06-15, 16:32)sadanyac Wrote: Hi!

Raspberry Pi 3 with LibreELEC 8.0.2.

I've update the plugin to 1.1.20 setting again user and password. I've authorized with other kodi installation (on Windows 10) plugin.audio.spotify to connect to the service but still showing the same message "The default browser should now be opened, follow the directions to authorize this app on spotify". There's not default browser on Kodi for Rapsberry Pi.

How can I set the app is already authorized?

Thanks in advance!

After a few reboots all works well. It seem something are blocking the 52308 port.

Sorry fot the inconvenience.


RE: Spotify for Kodi - ivan22957 - 2017-06-15

(2017-06-14, 22:25)marcelveldt Wrote:
(2017-06-14, 22:21)ivan22957 Wrote: Hi,
Can someone tell me what the problem is: doesn`t play any tracks and gives me an error.
Log here: https://pastebin.com/dcDuxLKu
Sorry, for me this log is a set of letters

I'm sorry, I assumed that everyone nowadays is running a 64 bit version of Windows so I did not compile librespot for 32bit Windows.
This means that only 64bits windows is supported, not 32 bits.
I'll have a look if I can compile it for 32bits too.

A more concrete answer to your question: It doesn't work because you're running a 32 bits version of Windows while the plugin expects 64 bits.


EDIT: Version 1.1.20 now has support for 32 bits windows too

Thank you so much, you solved my problem.


RE: Spotify for Kodi - jacen05 - 2017-06-15

(2017-06-15, 11:31)marcelveldt Wrote:
(2017-06-15, 08:07)jacen05 Wrote: I updated the addon to 1.1.20, enabled debug mode, rebooted, and then I stuck at the message "No credentials have been set or the login failed.".
I have some special characters in my password, could it be related?

I don't have time now to debug it, here is my log file : https://paste.ubuntu.com/24862667
I'll keep you posted as soon as I manage the login issue.

From your log:

INFO:librespot:Confusedession: Connecting to AP "gew1-accesspoint-a-205k.ap.spotify.com:4070"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 110, message: "Connection timed out" } }',

This indicates that there was either a connection issue at the time you tried, an authentication issue or a firewall issue.
It could be related to your user account but I'm pretty sure it's now. Incorrect credentials will give you another error.

Are you using a Facebook account to login to Spotify ?
I did not test that scenario yet and it may not be supported. In that case you can login with your "device id" and password which you can generate on the Spotify website under your account settings. That will generate a normal Spotify username and password to us eon devices that don't support the Facebook auth.

Spotted! Yes indeed it was a networking issue: my firewall is configured to block all connections (including outgoing) except the ones authorized. After adding a rule allowing port 4070 outgoing, both login and playback work perfectly!

The only problem remaining is the same as someone already posted: I can find my Kodi box from my smartphone with Spotify connect, I can order it to play a song, and the controls (both on the phone and on the TV screen) look like the track is playing, but no sound is outputed. I'll investigate this later as it's not important for me, but in case you are interested my logfile is here: https://paste.ubuntu.com/24865681

Thanks again for the addon!


RE: Spotify for Kodi - Didko - 2017-06-15

Raspberry Pi 1 with LibreELEC 8.0.2

After couple of reboots, port 52308 is now available. However, the system constantly pops out the message that the default browser should be opened. Here is the log after fresh reboot:

Code:
17:09:42.733 T:1773138848  NOTICE: plugin.audio.spotify --> Architecture detected. Using librespot binary /storage/.kodi/addons/plugin.audio.spotify/resources/lib/librespot/li
nux_arm/librespot
17:09:42.779 T:1613755296  NOTICE: plugin.audio.spotify --> Audio proxy started on port 52308
17:09:43.538 T:1747973024 WARNING: CSkinInfo: failed to load skin settings
17:11:18.933 T:1773138848  NOTICE: plugin.audio.spotify --> Launching system-default browser
17:11:18.934 T:1773138848  NOTICE: plugin.audio.spotify --> Waiting for authentication token...
17:11:27.790 T:1764750240  NOTICE: Previous line repeats 3 times.
17:11:27.790 T:1764750240   ERROR: GetDirectory - Error getting
17:11:27.866 T:1773138848   ERROR: Previous line repeats 3 times.
17:11:27.866 T:1773138848  NOTICE: plugin.audio.spotify --> Waiting for authentication token...



RE: Spotify for Kodi - Fjux - 2017-06-15

(2017-06-15, 15:14)marcelveldt Wrote:
(2017-06-15, 14:46)katwax Wrote: I created the asound.conf file and put it in the Configfiles directory on the HTPC, but still no sound.
Tried it with the name and also with the card number.

Is the Configfiles directory correct? Also tried /etc, but I get message that it's read only.

In LibreElec the file is called sound.conf and stored in the .config directory (also visible as samba share).
I know, it's a bit confusing ;-)

If you can't figure it out I can have a look at the code to create a selector for the sound card.

you put me off a bit here. i tried everything, still no luck. while if i did it manually through the commandline everything worked:


Code:
aplay -D hw:0,3 test.wav
(for my intel NUC is needed to select device 3 from card 0)

but the default did not work, as did any other alias.

I checkout out: /usr/share/alsa/alsa.conf

and it looks for config files in .config called asound.conf

But for everyone who is haveing issues read this:
https://www.alsa-project.org/main/index.php/Asoundrc
and: https://superuser.com/questions/626606/how-to-make-alsa-pick-a-preferred-sound-device-automatically

my config looks like this now:
Code:
pcm.!default {
    type hw
    card 0
    device 3
}
ctl.!default {
    type hw          
    card 0
    device 3
}
called: asound.conf inside the .config folder.

Im running the latest version of libreelec with Kodi 17.3


PS. the volume is not from kodi but from the system. spotify connect can change it but it wont change the kodi volume.

Though the volume is LOUDDDDD!!!! its now sitting at 5% and it still is a bit loud.

But most important: IT IS WORKING THANK YOU SOOOO MUCH @marcelveldt


RE: Spotify for Kodi - katwax - 2017-06-15

Still no luck with the sound.conf file, but I didn't had much time to test.
But still need to check out what Fjux posted.


RE: Spotify for Kodi - User 224999 - 2017-06-15

(2017-06-15, 17:00)John01nl Wrote: This one is probably better... has debug logs...
http://sprunge.us/feIF

Can you try again with version 1.1.21 ?
It should work now.


RE: Spotify for Kodi - User 224999 - 2017-06-15

(2017-06-15, 19:14)Didko Wrote: Raspberry Pi 1 with LibreELEC 8.0.2

See the first post's readme... The pi1 or pi zero are not supported.
Only pi 2 or pi 3.

I'm currently looking at a possible solution to build librespot for the pi1 too, hopefully that will work


RE: Spotify for Kodi - User 224999 - 2017-06-15

(2017-06-15, 20:02)Fjux Wrote: But for everyone who is haveing issues read this:
https://www.alsa-project.org/main/index.php/Asoundrc
and: https://superuser.com/questions/626606/how-to-make-alsa-pick-a-preferred-sound-device-automatically
PS. the volume is not from kodi but from the system. spotify connect can change it but it wont change the kodi volume.

Though the volume is LOUDDDDD!!!! its now sitting at 5% and it still is a bit loud.

But most important: IT IS WORKING THANK YOU SOOOO MUCH @marcelveldt

OK, great that it's now working and thanks for the tip to other users!
I will look more into this, maybe I can a some options in to fix the also volume and a sound card selector.

The issue is that for the spotify connect playback, librespot is outputting the audio directly to the sound card, bypassing Kodi.
Kodi is just playing a silent stream to trick the now playing screen.

It was the only was I could think of to get this live stream to work, all my other attempts failed.

Like I said, I will look into it a little more and maybe I can come up with an elegant solution to make it a bit more user friendly.

Most important is that the basics are now working and people are getting audio ;-)


RE: Spotify for Kodi - User 224999 - 2017-06-15

(2017-06-15, 20:15)katwax Wrote: Still no luck with the sound.conf file, but I didn't had much time to test.
But still need to check out what Fjux posted.

OK, either give the also settings a go or wait a bit because I think I can add some controls to select the sound card.


RE: Spotify for Kodi - Didko - 2017-06-15

(2017-06-15, 21:07)marcelveldt Wrote: See the first post's readme... The pi1 or pi zero are not supported.
Only pi 2 or pi 3.

I'm currently looking at a possible solution to build librespot for the pi1 too, hopefully that will work

Oh... Sad The previous version was working. Didn't read the changes..
Well, I was considering upgrade anyway, so if there is no chance for pi 1, then the moment has come Smile


RE: Spotify for Kodi - John01nl - 2017-06-15

(2017-06-15, 21:05)marcelveldt Wrote:
(2017-06-15, 17:00)John01nl Wrote: This one is probably better... has debug logs...
http://sprunge.us/feIF

Can you try again with version 1.1.21 ?
It should work now.

Evening Marcel,

Thank you again for your work so far. I had to set the playback device back to local and spotify was playing again. So happy about that Smile

Still... there's one thing I can't get to work. And that's Spotify connect from my laptop/android phone to your plugin.
I can see kodi being present within spotify and can now select it as a playback device. When I select a song, play it and then choose to play back on kodi... I do see that it is being played within kodi but... there is no sound. While local playback works now....

I hope you can get some information from my logs again. Have a great evening and thanks again for everthing so far.

http://sprunge.us/SgLG

With regards,
John