spotify

Spotify Apps - Getting Playlist Tracks

穿精又带淫゛_ 提交于 2019-12-08 12:17:58
问题 I'm developing a Spotify app and want to get the tracks for a Playlist. There's the function playlist.tracks but that seems to be cached and gets the wrong list of tracks. It's also supposed to be slow and not recommended to be used in the API documentation. But what other option do I have to get a Playlist's tracks? At the moment I'm using playlist.tracks once and informing my back-end of the track list. Thanks. 回答1: For the 1.0 API: require([ '$api/models' ], function (models) { var addList

Spotify create playlist and add tracks

放肆的年华 提交于 2019-12-08 12:09:54
问题 I am trying to add a "save as playlist" button to my app API 1.0. Can someone help me figure out what is wrong here? var player_obj = models.Album.fromURI('spotify:album:7o7UHh5PfO1kY4YoxqrwN7'); player_obj.load('tracks').done(function(a){ var saved_playlist = new models.Playlist.create(player_obj.name); console.log(saved_playlist); a.tracks.snapshot().done(function(snapshot){ for (var i = 0, l = snapshot.length; i < l; i++) { var track = snapshot.get(i); saved_playlist.add(track); } }); });

Spotipy - set CLIENT_ID and CLIENT_SECRET

巧了我就是萌 提交于 2019-12-08 10:05:19
问题 Where do I go to set CLIENT_ID and CLIENT_SECRET so it's not stored in my python script? The Spotipy documentation says the following, but I can't figure out where I need to go to input these environment variables. Where do I set os.getenv? if not client_id: client_id = os.getenv('SPOTIPY_CLIENT_ID') if not client_secret: client_secret = os.getenv('SPOTIPY_CLIENT_SECRET') if not client_id: raise SpotifyOauthError('No client id') if not client_secret: raise SpotifyOauthError('No client secret'

How to get current user's playlist from Spotify

。_饼干妹妹 提交于 2019-12-08 09:56:52
问题 I am trying to implement Spotify integration with current user's playlist to display it in my tableview. I have integrated with login and access token everything works fine. I have gone through stack overflow link:- How to get the list of songs using Spotify in Swift3 iOS? but didn't work for me. Then to get print for canonicalUsername as below, its showing nil value SPTUser.requestCurrentUser(withAccessToken:(SPTAuth.defaultInstance().session.accessToken)!) { (error, data) in guard let user

Spotify API - Location

别说谁变了你拦得住时间么 提交于 2019-12-08 09:23:37
问题 I am trying to use "api/location" as stated in the documentation but for some reason that's always failing with error code 0 , type transient , which is not really helpful. Any ideas. var loc = location.query(); loc.load(['latitude']).done(function(loc) { console.log("Lat:" + loc.latitude); }).fail(function(track, error){ console.log(error); }); Also, it would help if anyone can explain how the location is retrieved. 回答1: According to the answer on this question: https://stackoverflow.com/a

Spotify cocoalibspotify offline status set to 1 but all tracks stuck at waiting

旧街凉风 提交于 2019-12-08 08:34:43
问题 I'm trying to allow tracks from Spotify to be played offline in my iOS app. I've read several posts about this problem, but none of the suggestions work for me. The issue is a playlist marked for download gets stuck with all tracks "waiting" to be downloaded. I can recreate it regularly in a fresh app install by creating a playlist, adding a few tracks, and mark playlist for download. Tracks download as expected. Then I background the app by tapping the home button and kill the app in the app

ReactNative - Spotify SDK dependency conflict

不问归期 提交于 2019-12-08 07:56:20
问题 I have a ReactNative project with an Android Module used for authenticating with spotify, using Spotify SDK (will be using playback later on). When building the project, the following error comes up from grandle: > Duplicate files copied in APK lib/armeabi-v7a/libgnustl_shared.so File 1: ...root../android/app/build/intermediates/exploded-aar/com.facebook.react/react-native/0.16.1/jni/armeabi-v7a/libgnustl_shared.so File 2: ...root../android/app/build/intermediates/exploded-aar/com.spotify.sdk

Spotipy — accessing tracks from a public playlist without authentication

徘徊边缘 提交于 2019-12-08 06:49:37
问题 I want to search through public playlists and get the tracks. So far I have code which can get the names of the playlists but not the tracks: import spotipy import sys sp = spotipy.Spotify() if len(sys.argv) > 1: artist_name = ' '.join(sys.argv[1:]) results = sp.search(q=artist_name, limit=20, type='playlist') for i, t in enumerate(results['playlists']['items']): print(i,' ', t['name']) This will print a list of the first 20 public playlists names given the search condition. What I want is to

Downloading cover art URL from Spotify and key-value observing

别说谁变了你拦得住时间么 提交于 2019-12-08 06:01:09
问题 I'm displaying a list of Spotify tracks in a table view in my application, and I'd like to download the cover art for the albums that these tracks belong to. I'm logged in to CocoaLibSpotify, and I can play all the tracks, so that part is fine. What I can't seem to get to work is the download of the cover art. I follow the code of the SimplePlayer project, with the exception that I store the SPTrack instances in a mutable dictionary (tracksDownladingForCoverArt), since there could be many

Spotify API 1.x get user session

三世轮回 提交于 2019-12-08 05:45:28
问题 Trying Spotify API 1.x. My manifest "Dependencies": { "api": "1.20.1", "views": "1.24.1" } Having problem getting the current session with the new spotify API. Session Docs After a while I got the user information with this: require(['$api/models','$api/models#User','$api/models#Session'], function(models) { var user = models.User.fromURI('spotify:user:@'); user.load('username', 'name').done(function(u) { userUid = u.identifier; }); }); But the Session doesn't have the load method (getting