Questions tagged [libspotify]

The libspotify C API package allows third-party developers to write applications that utilize the Spotify music streaming service.

Libspotify
The libspotify C API package allows third-party developers to write applications that utilize the Spotify music streaming service. Hopefully, this will enable and inspire you to build some really cool stuff. We’re looking forward to seeing what you can come up with.

Documentation
The API documentation is available online. The libspotify distribution also contains the documentation, as well as a few code examples. There is also an FAQ available.

Application keys
Please login with your Spotify Premium account to apply for an application key.

Download
Libspotify is available for Windows, Mac OS X (x86 / x86_64), iOS, and Linux (x86 / x86_64 / ARM).

Download the file and unpack it with your favourite extractor. On the command line for most Linux distributions, you can use tar xzf libspotify-*.tar.gz to extract it. You will now have a directory called something starting with libspotify-. Inside, you should find a README worth at least skimming through.

User experience guidelines
The following guidelines have been carefully developed to provide our users with a familiar and friendly experience across all platforms, and to maintain the Spotify look & feel that we all know and love. Please ensure that your application follows them closely.

Branding
See the Terms of Use on how to use these logotypes.

Branding in graphical user interfaces

Terms of Use
We need to protect users, content providers, the Spotify trade marks and our software and service while at the same time enabling you to create applications. We therefore require you to comply with some basic rules. You should also note our trade mark guidelines.

Furthermore we want to let you know that the use of our APIs under these terms is for non-commercial use only: they are not intended to allow you to sell any software or devices based on these APIs. If you would like to make use of Spotify in a commercial way, then please contact our Partner team before you engage in any work.

Region-specific Terms of Use can be found here:

Third party licenses
Several fantastic pieces of free and open-source software have really helped get Spotify to where it is today. A few require that we include their license agreements within our product. Consider it done. As we enjoy giving credit where it's due, we included the entire list below. This means you can not only see which software we've been using, but the terms of the licenses too. A big thanks from all of us at Spotify to the smart people behind the fantastic programs listed. Rock on!

218 questions
1
vote
3 answers

Run the libspotify examples

I am trying to run the spotify examples. I have sucecsfully compiled them but I cannot run anything. When i.e. do ./jukebox.o it just says "cannot execute binary file". How do I run the examples? This is what I got when i did make:…
AlexanderNajafi
  • 1,631
  • 2
  • 25
  • 39
1
vote
2 answers

libSpotify is crashing in Android

I'm doing an app that requires Spotify in Android. But when i run libSpotify "sp_session_create" i get a SIGSEGV. The version of libSpotify that i'm using is v12.1.51 BETA - For android ARM sp_error initialise(const char * asKey, …
Agustin Alvarez
  • 349
  • 1
  • 2
  • 11
1
vote
0 answers

In libspotify, when does the the PlaylistContainer become invalid (or: what is the lifetime of it)?

This question is mostly a question on the workings of libspotify on a conceptual level. I have tried various (unsuccessful) pieces of code, of which I cannot get a firm grasp, because I feel I don't fully understand how the library works. The docs…
1
vote
0 answers

libspotify: Artist browsing does not load similar artist portraits

I've noticed that the artists returned by sp_albumbrowse_similar_artist() do not have their portraits loaded (load status on sp_artist objects is true). By that, I mean that neither sp_artist_portrait() nor sp_link_create_from_artist_portrait()…
1
vote
0 answers

Spotify: find out which track is currently playing

I'm looking for a way to find the track a user is currently playing (if any). Curiously, there doesn't seem to be any provision for this in libspotify. I'm not even sure that this functionality is possible at all. Spotify allows a user (account) to…
1
vote
0 answers

CocoaLibSpotify OfflineStatus of Track added to 'markedForOfflinePlayback' Playlist after application restart always SP_TRACK_OFFLINE_WAITING

So I have a problem with CocoaLibSpotify a lot of developers used to have(but that 'has been fixed with updates' and I am on the newest version). There are a lot of posts about this on the web, e.g.: Spotify cocoalibspotify offline status set to 1…
user2456014
  • 355
  • 1
  • 4
  • 13
1
vote
0 answers

Attempt to login in CocoaLibSpotify with stored credentials fails

I've integrated CocoaLibSpotify in my iOS app and I am developing user login. By the first time, the login controller is shown, and if the login is successful, user credentials are generated and stored in NSDefaults, as Rich Able explains in…
Pablo Blanco
  • 69
  • 10
1
vote
0 answers

CocoaLibSpotify Download/Cache Playlist Tracks Issue

I'm having some difficulty with CocoaLibSpotify, I'm trying to cache/download a playlist to my IPad thorough my app but I cant seem to be able to get it to download. I could do with a step by step if possible I've had a look at these links to no…
John Richard Salt
  • 1,003
  • 8
  • 11
1
vote
1 answer

Unity3D Android Spotify Plugin causes signal 11 (SIGSEGV)

I have written a Unity3D plugin to connect my application with Spotify through libspotify. Windows version works fine, but android version crash about 5 seconds after log in Spotify. Here is the adt logcat Build fingerprint:…
1
vote
1 answer

SPAlbumBrowse - Getting an Accurate List Of An Artist's Albums

Okay. This is getting crazy. I've been working on this for a few days trying different weird things. I think I had a nightmare last night about libSpotify, might be a product of my sleeping habits, but, I digress. Anyway. Let's look up the artist…
Matt Egan
  • 809
  • 1
  • 10
  • 16
1
vote
1 answer

Sending song information through spotify

I've been scouring the internet for some sort of support for this and I cant seem to find much so I have to start a question. I have a project where I am to display the track title, artists name, and other basic song information, on a separate…
Funkyguy
  • 628
  • 2
  • 10
  • 31
1
vote
1 answer

Massive Memory Leak - CocoaLibSpotify

I'm using the CocoaLibSpotify library to load album art for Spotify search results. Instruments reports no leaks, and static analysis isn't helping out either, and I've manually reviewed all of my code that deals with keeping track of loading the…
Matt Egan
  • 305
  • 1
  • 4
  • 10
1
vote
4 answers

libspotify crashes with segFault after calling sp_session_create

I was testing out libspotify library (version 12.1.51 x86 for linux) and the application keeps crashing when I call sp_session_create() with a segmentation fault. I don't have application key, nor a Premium Spotify account (yet), but that shouldn't…
TiagoOliveira
  • 507
  • 6
  • 17
1
vote
1 answer

Build Python package with C bindings in Windows (VC90) causes LNK1181 fatal error

I'm trying to build a Python package (pyspotify) with bindings to a C library (libspotify). I'm using Python 2.7.5 and have installed VS2008 Express for some required commandline tools. When I call python setup.py build from the Command Prompt (with…
Kristian Frost
  • 791
  • 5
  • 21
1
vote
1 answer

Getting the examples in libspotify to work under Windows 7

I want to get started with libspotify on my Win 7 machine but I dont have a clue on how to get it all setup so that I can even run the examples included in the pack. I have a Spotify Premium account and I have tried installing libspotify by copying…
Kausti
  • 11
  • 2