mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #89] Show tracks from playlists returned by search()? #41
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jkvlevin on GitHub (Apr 13, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/89
Can't figure out how to show the tracks from playlists returned by the search function.
@dabcoder commented on GitHub (Apr 29, 2016):
Do you have any code snippets you could show? Can you be more specific wrt what the issue is exactly?
@jkvlevin commented on GitHub (Apr 29, 2016):
I was able to figure it out. Thanks though for the response!
Jake
@nyboer commented on GitHub (Nov 23, 2016):
please post your solution! I am having the same problem.
@jkvlevin commented on GitHub (Nov 23, 2016):
Hi there,
I'm not entirely sure I remember correctly, but I believe the issue was
rooted in the fact that I had incorrectly intialized my spotipy object.
Make sure your sequence looks something along the lines of:
sp = spotipy.Spotify(auth=token)
results = sp.search(q=query, limit=limit, type='playlist')
for playlist in results['playlists']['items']:
results = sp.user_playlist(playlist['owner']['id'], playlist['id'], fields="
tracks,next")
tracks = results['tracks']
Hope this helps!
On Wed, Nov 23, 2016 at 4:28 PM, nyboer notifications@github.com wrote:
@nyboer commented on GitHub (Nov 24, 2016):
yes, thanks. I figured out what I was doing wrong, too - I was calling user_playlist with a variable that stored the logged-in name. once I replaced that with the playlist.owner.id , it worked.
@jkvlevin commented on GitHub (Nov 24, 2016):
Glad to hear. Best of luck!