spotify

sp_user_display_name always returns canonical name, even when user is loaded

旧街凉风 提交于 2019-12-13 06:42:48
问题 Hello Spotify community =) I've been beating my head against this for a while. When I ask libspotify for the owner of a playlist via sp_playlist_owner , I am never able to get the user's display name out from sp_user_display_name . In the API, it mentions that the display name is only available after the user has been loaded. Specifically, this should be when sp_user_is_loaded returns true . However, I have found this to not be the case. I have hooked into every available playlist callback in

possible spotify portrait metadata caching bug

南楼画角 提交于 2019-12-13 04:42:51
问题 Code to replicate In my app I have the following code. var seed = "spotify:artist:3UbyYnvNIT5DFXU4WgiGpP"; sp.core.getMetadata(seed, { onSuccess: function (metadata) { console.log(metadata); }, onFailure: function () {} }); Steps to view the behaviour If spotify is already open close it and then reopen it, after opening spotify run the app and view the console Which displays as Object name: "Whitesnake" portrait: "" type: "artist" uri: "spotify:artist:3UbyYnvNIT5DFXU4WgiGpP" __proto__: Object

Get play count from top songs on Spotify

不打扰是莪最后的温柔 提交于 2019-12-13 04:36:42
问题 I'd like to track play counts of songs for popular artists. This doesn't appear to be available through the Spotify API, but it's visible either through the desktop app or the web app here. Is there a simple way to scrape this data? 回答1: No, this data isn't exposed in the public API. This feature was added as an enhancement request in the Web API's public issue tracker less than a month ago. Feel free to add support for it by writing about your use case, or by simply putting a +1 . 来源: https:

Cannot load external API's in index.html

吃可爱长大的小学妹 提交于 2019-12-13 04:33:33
问题 I am trying to run the following code in Spotify apps but gapi.client is considered undefined. I do not have this problem when running in chrome. Does anyone know why or how this is happening. <!doctype html> <html> <head> <title>Vidify</title> </head> <body> <!--Add a button for the user to click to initiate auth sequence --> <button id="authorize-button" style="visibility: hidden">Authorize</button> <script type="text/javascript"> var clientId = '591751286145

Spotify API bad request on api/token authorization Error: 400

江枫思渺然 提交于 2019-12-13 04:12:34
问题 I am trying to authorize spotify api requests using Client Credentials Flow on the Spotify API Docs page. Here is my code in javascript ES6 format using the fetch API const response = await fetch('https://accounts.spotify.com/api/token', { mode: 'no-cors', method: 'POST', headers: { 'Authorization': 'Basic Yzg4OWYzMjM5MjI0NGM4MGIyMzIyOTI5ODQ2ZjZmZWQ6MmUzZTM2YTMzMTM5NDM1Mzk3NzM4ZDMxMTg4MzM0Mjc=', 'Content-type': 'application/x-www-form-urlencoded' }, body: 'grant_type=client_credentials' });

Views.player album cover

时光总嘲笑我的痴心妄想 提交于 2019-12-13 03:40:28
问题 Is it possible to set a custom image on the views.player? I've tried to change the player.image.node but I don't get it to work. Any ideas? Thanks 回答1: This is what I'm doing. Not sure if it is the official way but it works. var player = new views.Player(); var image = new views.Image(img_url, spotify_uri, title); $(player.node).find('.sp-player-image').replaceWith(image.node); $('.player_div').append(player.node); I would love to hear if anyone has a better solution. 回答2: Yes, the

CocoaLibSpotify playback crashes after a few seconds

守給你的承諾、 提交于 2019-12-13 02:48:34
问题 I followed the SimplePlayer example project while integrating it in my own test project. Logging in and searching for tracks already works perfectly, but when I try to play a song like SimplePlayer it crashes after 1-2 seconds of playback with EXC_BAD_ACCESS on two different locations in SPSession.m (see picture below). Here is the code that starts playback: SPTrack *track = [allTracks objectAtIndex:currentTrack]; [SPAsyncLoading waitUntilLoaded:track timeout:kSPAsyncLoadingDefaultTimeout

Subscribe to Spotify events

依然范特西╮ 提交于 2019-12-13 02:22:00
问题 Does anyone know of a way to subscribe to events in the Spotify application? To subscribe to iTunes events, you would just add an observer to the notification center like this: [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(changedTrack:) name:@"com.apple.iTunes.playerInfo" object:nil]; Thereby all events will be send in an NSNotification to changedTrack: . I can't seem to find a similar (or any way) to do this for Spotify but I know there are

Spotify Web Apps - limit results to 50 instead of the default 100

依然范特西╮ 提交于 2019-12-13 00:39:36
问题 Spotify Web XML/JSON (i'm using XML) makes you default to 100. Is there something I can add to the xml file i'm calling to limit the result to another number? 回答1: No, there's no way to change the itemsPerPage property. There's no public roadmap for the Web API, but there hasn't been any (significant) changes the past couple of years, so it's not very likely that this will change any time soon. 来源: https://stackoverflow.com/questions/10625438/spotify-web-apps-limit-results-to-50-instead-of

Detect a user's current song in Spotify api

◇◆丶佛笑我妖孽 提交于 2019-12-13 00:39:00
问题 I was wondering if it was possible to detect what song a user is listening to from his/her current active device via the spotify web api. Thanks. 回答1: I know this is an old question, but there is a new beta API endpoint available that supplies this information. It does have some bugs that I've noticed though. Stations only: If you change stations, you have to restart Spotify to get the API endpoint to update and continue updating. According to bug reports, it lags behind 20 to 30 minutes at