-
Notifications
You must be signed in to change notification settings - Fork 123
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
Progress time received from API can be negative #363
Comments
Thanks for your report, The Spotify's documentation doesn't point out the If I would like to replace |
If we consider replacing |
Do we know in which cases we receive a negative value? Another option is to have a custom serializer that sets these cases to zero, though I do prefer to represent the API as closely as possible with |
As @bamode points out, the |
Message to comment on stale issues. If none provided, will not mark issues stale |
Describe the bug
This issue effects specifically the structs
CurrentlyPlayingContext
andCurrentPlaybackContext
when deserializing the Spotify API response that corresponds to theprogress
field of these structs. It appears to be parsing it as au32
to turn into astd::time::Duration
and this part of the API response is occasionally a negative number. This results in upstream bugs in the spotifyd and spotify-tui projects.Expected behavior
The API deserialization should be able to replace an unexpected negative time value with some default.
The text was updated successfully, but these errors were encountered: