Skip to content

played_at should be avilable when getting recently played tracks #54

Description

@kimipsen

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`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions