ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
639 stars 123 forks source link

Incorrect type for playlist position #407

Closed hrkfdn closed 1 year ago

hrkfdn commented 1 year ago

Describe the bug With #375 some types were changed from integers to chrono::Duration. While this is a great change, I believe a mistake snuck in:

https://github.com/ramsayleung/rspotify/blob/0a6c136b56ab1e882e26ac536a44c405a37706e4/src/clients/oauth.rs#L292-L315

Expected behavior

The position in this method is a playlist position and not time related. I don't think chrono::Duration is appropriate here. What do you think?

ramsayleung commented 1 year ago

Agree, it should be an integer instead of Duration, because it's a zero-based index. I would like to fix it as soon as possible.

ramsayleung commented 1 year ago

This problem has been fixed, the type of position rollback to Option<u32>

hrkfdn commented 1 year ago

Hooray, thanks! :tada: