mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #135] Is it possible to reorder more than one track at a time? #83
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#83
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 @ilitotor on GitHub (Jul 28, 2018).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/135
Can I reorder, for example, 10 tracks at a time?
Put the last 10 track in the first positions?
Or just one by one?
thanks.
@jwilsson commented on GitHub (Jul 28, 2018):
Hi!
Yes, you can reorder any number of tracks. An example putting the last 10 tracks first:
@ilitotor commented on GitHub (Jul 30, 2018):
Hi, thanks for the quick response!
But, if I wanna put 10 tracks which are in non-sequential positions, in first?
For example: put track 4, 9, 13 in first. Or put in first 15, 9, 7, 11.
I tried to create a loop, but obviously, with each loop, the positions had already changed.
Is there a way to put an array first?
Thanks,
@jwilsson commented on GitHub (Jul 30, 2018):
Aha, I see. It doesn't look like it's possible to pass an array though.
But shouldn't you be able to solve it by using a loop? Something along the lines of updating
range_startand/orinsert_beforeon each iteration?@jwilsson commented on GitHub (Jul 30, 2018):
Or on second thought, perhaps
SpotifyWebAPI::replacePlaylistTracks()could be used together withSpotifyWebAPI::getPlayListTracks().For example, getting all the tracks, reordering them, and then replacing the whole playlist.
@ilitotor commented on GitHub (Jul 30, 2018):
Amazing!
I will try this approach!
Thanks a lot