Kodi Community Forum
Spotify support in XBMC via Openspotify and Despotify (open source Spotify clients)? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Spotify support in XBMC via Openspotify and Despotify (open source Spotify clients)? (/showthread.php?tid=45980)

Pages: 1 2 3 4 5


Spotify support in XBMC via Openspotify and Despotify (open source Spotify clients)? - soder - 2009-02-24

Now with Openspotify and Despotify is it possible add Spotify support to XBMC via their open source code?*

*Both Openspotify and Despotify are cross-platform clients which require the user to have a registered Spotify premium subscription account!

http://eternalmedia.se/openspotify/
Quote:Openspotify - the legal open source alternative to libspotify

Openspotify is an open source, cross platform re-implementation of Spotify’s closed source libspotify library coded in C. It’s aimed to replace the library used by despotify while making it easy to switch to libspotify in the future.

You can get it from GitHub by cloning the repository:
Quote:git clone git://github.com/noahwilliamsson/openspotify.git

It consists of the libopenspotify library, some example code (ported from libspotify’s distribution) to test functionality as well as project files for Microsoft Visual Studio 2008 and Xcode 3.1 (and GNU makefiles)

Just as with the official libspotify library, and as stated in the FAQ at despotify.se, a premium subscription is required! Developers who have a Spotify premium subscription account can apply for a "Application Key" which is unique for each software application.


I’ll write code for anything related to libspotify/libopenspotify in exchange for money. Let me know if you’re interested. I’m VAT registered.

/ Noah Williamsson


http://despotify.se
Quote:Despotify - the open source Spotify client

#hack.se proudly presents an open source Spotify client
Features

* C implementation based on F/OSS code
* Proof of Concept multi-OS client with text-based UI
* Proof of Concept gateway to the Spotify service (text-based protocol, for supporting REST)
* Language bindings for Python and Ruby

Quite a few Spotify related sites have appeared since we launched in October, I've previously mentioned a number of them which are dedicated to sharing playlists but there are lots of other sites that talk about Spotify or have used Spotify in interesting ways.
...
We love stuff like this so if you've done something creative with Spotify please let us know, we'd like to see it and share it with everyone.


Source: Spotified CD collection and some other community sites

Video intro (old ncurses client): despotify ncurses (youtube.com)


Source code for Despotify

The latest version of the source code is available in our Subversion repository

Feel free to browse the source code

You'll need OpenSSL, zlib, libvorbis and one of the packages to support the audio backends. Under Linux you can choose between pulseaudio, gstreamer and libao.

Installation command for dependencies under Debian/Ubuntu
aptitude install libssl-dev zlib1g-dev libvorbis-dev libtool
aptitude install libpulse-dev # For pulseaudio backend
aptitude install libgstreamer-plugins-base0.10-0 libgstreamer0.10-dev # For GStreamer backend
aptitude install libao-dev # For libao backend



- theophile - 2009-02-24

I believe it has been said that there will not be a spotify plugin.


- soder - 2009-02-24

theophile Wrote:I believe it has been said that there will not be a spotify plugin.

Hmm, ok. Any reasons for this?

/Söder


- theophile - 2009-02-24

soder Wrote:Hmm, ok. Any reasons for this?

/Söder

See here: http://forum.xbmc.org/showthread.php?p=264822&highlight=spotify#post264822


- TheBurner - 2009-02-25

I think only vonage said that im sure someone will its open and legal for .se no?


- opex - 2009-03-21

Even if despotify say they're not supported by spotify, despotify can still be used by paying customers. Only the free and one-day passes are filtered out by the spotify service.
This would lead me to believe the people behind spotify realizes clients like despotify won't go away but instead makes some effort to include them.
To utilize this opportunity and add support for it would be a great idea imho


Spotify to release an official API - could a script or plugin for XBMC use that API? - craigd - 2009-04-06

http://www.guardian.co.uk/technology/blog/2009/apr/06/spotify-to-launch-api

Spotify are launching api this week supposedly, woyuld be an awsome addition to xbmc incredible app imo.


Spotify released a library! - ChristianW - 2009-04-07

http://developer.spotify.com/en/libspotify/docs/

Developer keys are availible only to Premium users though.

Anyone want to give something a shot? Or start a discussion on how Spotify could be integrated in XBMC?

-C-


- topfs2 - 2009-04-07

Fun to see they did that, the library seems nice with a good license.
However the terms of use seems to be bothersome at best.

Namely
3.1 - We can´t compile with spotify on MID (as it's a handheld dev most of the time)
3.2 - You wouldn´t be able to controll spotify via the httpapi and webserver
3.10 - We would need you to accept an enforceable end user license agreement.

3.10 is the biggest worry and we don´t want that.

Cheers,
Tobias


- ChristianW - 2009-04-07

I don't really see how that is discouraging. A solution would be to make it as a plugin, and have the user agree to an EULA just for using that plugin.

Can you make plugins in C or would one have to create a python wrapper for it?

-C-


- topfs2 - 2009-04-07

Only python are supported as plugins. And it might work, not that I´m going to do it though Smile

Sad part is that plugin would never make it into any official build.


- topfs2 - 2009-04-08

To bring the implementation ideas flowing I thought somewhat about this and ended to the following conclusion:
The main thing about spotify is that you can search on any song and you "should" get that song, writing a search string on a HTPC is just no fun at all. (if you don't have a keyboard that is)

So I have one idea on how to have that problem simplified abit, if one takes anything you have in the Music library, ie songs, a user could select a song from a list. This is however not very usefull as the user has that song already Smile but if you combine it with last.fm which can give similair songs the user could get prompted with a list of similair songs which could then be listened to by demand.

So a vfs looking something like this. (Not exactly but to better explain)
  • Search
  • Similair artist
  • Similair album
  • Similair song

were pressing "Similair song" would get you a list of your current songs and after choosen one of them a new list would come up based on similair songs of the selected song?.

This would make it atleast easier to listen to new music based on what you already like.


- ChristianW - 2009-04-14

I think I would start with implementing the playlist function. So you get a vfs with all your playlists. Then if you open a playlist you would get a list of the songs in that playlist.

I don't have premium however, so I can't get to start working on this Wink

Any good tutorials on how to make python libraries in C? Smile

-C-


- junk - 2009-04-19

I hope they release a version for W32/.NET. I would definitely build a plugin, it could (sad but true) replace my music library!


- topfs2 - 2009-04-19

junk Wrote:I hope they release a version for W32/.NET. I would definitely build a plugin, it could (sad but true) replace my music library!

You can wrap a c library into C#. Also I don't have no clue what it would help you with xbmc Smile

ChristianW Wrote:I think I would start with implementing the playlist function. So you get a vfs with all your playlists. Then if you open a playlist you would get a list of the songs in that playlist.

I don't have premium however, so I can't get to start working on this Wink

Any good tutorials on how to make python libraries in C? Smile

-C-

You can look on xbmc svn. xbmc/lib/libPython especially we wrap GUI in xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp

Also here is some more info: http://www.python.org/doc/2.5.2/ext/simpleExample.html