Beta - Spotify for Kodi

  Thread Rating:
  • 15 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
marcelveldt Offline
Skilled Skinner
Posts: 8,085
Joined: Jul 2014
Reputation: 325
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.
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.

EDIT: Update version 1.1.0 - june 2017
The add-on had a major refactor and is now no longer relying on libspotify.
Instead it will now utilize a slightly modified version of librespot (open source spotify sdk) with a big thanks to @plietar for creating this custom spotify SDK.
Also, it's no longer needed to have a webbrowser installed on the pi.

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)
- spotify connect control of the kodi player is experimental and not 100% stable
- Local playback is supported on Windows, Linux and MacOS, all architectures
- On Android and iOS only spotify connect playback is possible, meaning the addon will control an existing Spotify Connect app/device

Supported platforms for local playback
- Windows (32/64 bits)
- Linux x86 64 bits (tested with ubuntu and libreelec)
- Linux on arm/arm64 cpu (tested with ubuntu)
- Raspberri Pi 2/3 (not 1 or zero!) with raspbian or libreelec
- MacOS Intel 64 bits

All other platforms will not have local playback support, instead you can control an existing spotify connect player.
In that case, the Kodi player will mimic as if it's playing (show the visualization screen)
Pi users: The Pi 1 or Pi Zero is not supported for local playback.

Thanks for testing and enjoy the spotify experience on Kodi.

NOTE: You need a Spotify PREMIUM subscription to use this addon. No support for free accounts !

Reporting issues
If you have an issue, please report as much details as you can;
- Hardware
- OS
- Kodi version
- Addon version
- If possible: a kodi log grabbed after discovering an issue.
(This post was last modified: 2017-06-15 02:15 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: 8,085
Joined: Jul 2014
Reputation: 325
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: 8,085
Joined: Jul 2014
Reputation: 325
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: 8,085
Joined: Jul 2014
Reputation: 325
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,022
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: 8,085
Joined: Jul 2014
Reputation: 325
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,022
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,022
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: 8,085
Joined: Jul 2014
Reputation: 325
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