Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

played_at should be avilable when getting recently played tracks #54

Open
kimipsen opened this issue Sep 5, 2023 · 0 comments
Open

Comments

@kimipsen
Copy link
Contributor

kimipsen commented Sep 5, 2023

Is your feature request related to a problem? Please describe.
When fetching tracks with Get-RecentlyPlayedTracks as it is at the moment, no information regarding playback timestamp is available in spotishell, but the API does mention it being available (played_at).
A (re-)write to allow getting this information would solve the problem. The simplest change is to change $Response.items.track to $Response.items at the end of the function. But this would be a breaking change.

Describe the solution you'd like
I would like to be able to get the played_at value for each track. That way I might be able to page through my recently played tracks, using a combination of Limit and BeforeTimestamp/AfterTimestamp.

Describe alternatives you've considered
I considered adding an additional argument to Get-RecentlyPlayedTracks - something similar to a flag, eg. -ItemsNotTracks and then inside the function simply check on this, and either use the current logic when the flag is missing and then use the new logic when it is available.

$tracks = Get-RecentlyPlayedTracks #Would work as is
$items = Get-RecentlyPlayedTracks -ItemsNotTracks #would return items, which has (atleast) 2 properties: `played_at`, `track`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant