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

Get duration from duration_ms for playing_now listens #481

Merged
merged 3 commits into from Jan 20, 2019

Conversation

paramsingh
Copy link
Collaborator

Summary

  • This is a Feature Addition

  • Describe this change in 1-2 sentences: The Spotify API sends us the durations in ms, so if we get a listen with the key duration_ms we should use it to calculate the expiration time of currently playing tracks.

Problem

We were ignoring the duration_ms key.

Solution

Use the duration_ms key and add tests for expiration.

@paramsingh paramsingh changed the title Get duration for duration_ms for playing_now listens Get duration from duration_ms for playing_now listens Jan 19, 2019
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of the naming below?

Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listen_timeout makes it more clear now.

@paramsingh paramsingh merged commit 449c890 into metabrainz:master Jan 20, 2019
@paramsingh paramsingh deleted the now-playing-durations branch January 20, 2019 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants