strautomator / core

Strautomator Core
MIT License
41 stars 5 forks source link

Spotify track list added to description in reverse order #20

Closed halvorson closed 1 year ago

halvorson commented 1 year ago

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.

https://github.com/strautomator/core/blob/aa82eb284dfce50d17c9ad4c64085ebb28d1cd4d/src/spotify/index.ts#L325

igoramadas commented 1 year ago

Fixed: https://github.com/strautomator/core/commit/ee84770f9d40098c3bb224313e2dbd8ff8333b58

Should be live in a few hours. Thanks for the tip :-)

igoramadas commented 1 year ago

Live now: https://github.com/strautomator/web/releases/tag/v23.73.11932