Beta - Spotify for Kodi

  Thread Rating:
  • 11 Vote(s) - 4.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #1
Hi all,

I've been working on a brand new Spotify addon for Kodi, which utilizes the new Web Api for Spotify, this means that all functionality is available as you can see in the other Spotify apps like "Your music" library, editing playlists etc.

Only for the playback it still utilizes the old libspotify SDK because playback is not yet available on the webapi.
As soon as playback is also available on the webapi, I'll replace the current libspotify implementation for playback with it's succeeder.

I have a first beta version working which should work pretty solid.

I have created it as a real music plugin, browse code written from scratch.

The plugin is available on my Kodi repo:
https://github.com/marcelveldt/repositor...-1.0.1.zip

Please install from the repo and not from Github so I can keep better track of any issues.

What's (not) working ?
- well, everything should be working like in other spotify apps
- not possible to remove playlists (not available in the webapi yet)
- playback still relies on the old libspotify SDK so no support for Android x86 and very new ARM chipsets (like nvidia shield)
- browser is required for the initial login


Notes:
- There has to be a webbrowser installed on your system for the first authentication dialog.
- I tried to implement a webbrowser autodetect for all platforms, if it's not working in your situation, please report.
- a Spotify PREMIUM account is needed for this addon.
- in some situations the first login might fail and you'll just have to try it again.
- for raspberry pi users (without webbrowser), see this post for a workaround.
- openelec/libreelec users: make sure to install the chrome browser from unofficial repository


Currently supported platforms:

Windows 32+64 bits
iOS
Android ARM-based (not aarch64 like nvidia shiield!)
Linux x86/x64/arm/arm64
OSX

So, no support for arm64 or x86 on Android, sorry!
If someone is interested in compiling libspotify for these platforms, let me know.

Thanks to @mazkolain for the libspotify python implementation!

Thanks for testing and enjoy the spotify experience on Kodi
(This post was last modified: 2017-05-07 23:40 by marcelveldt.)
find quote
nooryani84 Offline
Donor
Posts: 925
Joined: Feb 2012
Reputation: 13
Location: Norway
Post: #2
How can this work on OpenElec if you need a web browser for authentication? Is it using a Web Viewer Add-on:Web_Viewer (wiki) or a text-based browser like Lynx?

Edit: I installed the repo, but I can't see any Spotify addon. I've tried refreshing the repo. What am I doing wrong?
(This post was last modified: 2016-03-22 01:20 by nooryani84.)
find quote
Hormesis Offline
Junior Member
Posts: 13
Joined: Dec 2013
Reputation: 0
Post: #3
I'm trying to figure out the same thing, having issues on OpenElec because I don't have a web browser installed.
find quote
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #4
In the openelec unofficial repo there is a chrome browser which you can install.
find quote
Hormesis Offline
Junior Member
Posts: 13
Joined: Dec 2013
Reputation: 0
Post: #5
(2016-03-22 02:27)marcelveldt Wrote:  In the openelec unofficial repo there is a chrome browser which you can install.

I figured it out moments before your reply, so I feel like a bit of an idiot. Everything is working great so far, so thanks for the incredible work! My only suggestion would be to have an auto-play feature at some point, since right now it seems you can only play one song, then nothing plays next.
find quote
nooryani84 Offline
Donor
Posts: 925
Joined: Feb 2012
Reputation: 13
Location: Norway
Post: #6
(2016-03-22 02:27)marcelveldt Wrote:  In the openelec unofficial repo there is a chrome browser which you can install.

Thanks, will check it out Smile
find quote
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #7
(2016-03-22 02:48)Hormesis Wrote:  I figured it out moments before your reply, so I feel like a bit of an idiot. Everything is working great so far, so thanks for the incredible work! My only suggestion would be to have an auto-play feature at some point, since right now it seems you can only play one song, then nothing plays next.

OK, great you figured it out.
Autoplay next should already be implemented for both playlists and albums. From where did you play a song ?
find quote
Hormesis Offline
Junior Member
Posts: 13
Joined: Dec 2013
Reputation: 0
Post: #8
(2016-03-22 17:10)marcelveldt Wrote:  
(2016-03-22 02:48)Hormesis Wrote:  I figured it out moments before your reply, so I feel like a bit of an idiot. Everything is working great so far, so thanks for the incredible work! My only suggestion would be to have an auto-play feature at some point, since right now it seems you can only play one song, then nothing plays next.

OK, great you figured it out.
Autoplay next should already be implemented for both playlists and albums. From where did you play a song ?

I was trying to play music from My Music -> Songs. Also, I can't actually start the plugin anymore. No changes to my config, it simply won't start again. I've rebooted and re-configured as well, no dice. Worked fine before I went to bed yesterday, so I'll keep testing and see if I can get you more useful information.
find quote
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #9
(2016-03-22 17:36)Hormesis Wrote:  I was trying to play music from My Music -> Songs. Also, I can't actually start the plugin anymore. No changes to my config, it simply won't start again. I've rebooted and re-configured as well, no dice. Worked fine before I went to bed yesterday, so I'll keep testing and see if I can get you more useful information.

There should be a new version on the repo 1.0.2 to fix the possible start issues.

I'll implement the auto play for the music songs listing asap
find quote
Jönke Offline
Posting Freak
Posts: 1,021
Joined: Oct 2009
Reputation: 9
Location: Parts Unknown
Post: #10
How to use on Raspberry pi with Openelec ? ( has no webbrowser)
(This post was last modified: 2016-03-22 21:27 by Jönke.)
find quote
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #11
(2016-03-22 21:27)Jönke Wrote:  How to use on Raspberry pi with Openelec ? ( has no webbrowser)

I will add support for the web Viewer addon today:

Add-on:Web_Viewer (wiki)

EDIT: hmm, tried that and isn't working so no luck for pi users.

There is a small workaround to try if you have another client which actually does have a browser:
1. install the spotify client on a pc with a browser
2. open the spotify client and accept the authentication request in the browser.
3. now, on the filesystem navigate to kodi userdata\addon_data\plugin.audio.spotify and copy the cache file to the same location on your pi

I didn't test this but it's worth a shot If it works it might be an idea if I create an option to specify a custom path to the cache file because the token gets refreshed from time to time.
(This post was last modified: 2016-03-22 22:51 by marcelveldt.)
find quote
Jönke Offline
Posting Freak
Posts: 1,021
Joined: Oct 2009
Reputation: 9
Location: Parts Unknown
Post: #12
Thanks ! Any screenshots from addon in Kodi ? Smile
find quote
marv_el Offline
Senior Member
Posts: 219
Joined: Aug 2009
Reputation: 8
Location: Vienna, Austria
Post: #13
works great on openelec, thank you!
find quote
Jönke Offline
Posting Freak
Posts: 1,021
Joined: Oct 2009
Reputation: 9
Location: Parts Unknown
Post: #14
Issue: cant login with my username containing swedish letters ÅÄÖ and cant log in with facebook login.
find quote
marcelveldt Offline
Skilled Skinner
Posts: 7,957
Joined: Jul 2014
Reputation: 318
Location: The Netherlands
Post: #15
(2016-03-23 06:49)Jönke Wrote:  Issue: cant login with my username containing swedish letters ÅÄÖ and cant log in with facebook login.

Thanks for the catch, I just uploaded version 1.0.3 to the repo which should fix the login with special characters.
Facebook login should work, I use Facebook login myself too
find quote
Post Reply