Just opened an account, added an automation to replace Perform, ran a manual sync of an activity and saw that the tracks were populated in reverse order of how I listened to them.
I don’t think order is guaranteed by the Spotify API, but it does seem to return in reverse listening order.
This will also impact first and last track.
For a short term fix, you could just push to the front of your tracks array (unshift()), but may want to manually order items to future proof it, especially if Spotify has changed this behavior recently.
I have the technical skill to do the quick fix, not the long term one, and happy to submit the 1 line PR if helpful.
Just opened an account, added an automation to replace Perform, ran a manual sync of an activity and saw that the tracks were populated in reverse order of how I listened to them.
I don’t think order is guaranteed by the Spotify API, but it does seem to return in reverse listening order.
This will also impact first and last track.
For a short term fix, you could just push to the front of your tracks array (
unshift()
), but may want to manually orderitems
to future proof it, especially if Spotify has changed this behavior recently.I have the technical skill to do the quick fix, not the long term one, and happy to submit the 1 line PR if helpful.
https://github.com/strautomator/core/blob/aa82eb284dfce50d17c9ad4c64085ebb28d1cd4d/src/spotify/index.ts#L325