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

Update dbus_mpris to rspotify 0.12.0 #1220

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

BKasin
Copy link
Contributor

@BKasin BKasin commented Aug 31, 2023

To be honest my main motivation for this is that my cargo isn't obeying the .toml and keep pulling rspotify 0.11.7 which breaks mpris, and now that 0.12.0 is released it feels like it makes more sense to update to that than to 0.11.7.

0.11.7 switched completely from std::time::Duration to chrono::Duration, so update our usage accordingly.

0.11.7 also added Collectionyourepisodes to the Type enum, so add it to uri_to_id.

0.12.0 added an optional Market for country code, which for now is just to None in the one spot it was required to be set.

rspotify 0.11.7 switched completely from std Duration
to chrono::Duration, so update our usage accordingly.

0.11.7 also add Collectionyourepisodes to the Type
enum, so add it to uri_to_id.
eladyn
eladyn previously approved these changes Sep 3, 2023
Copy link
Member

@eladyn eladyn left a comment

Choose a reason for hiding this comment

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

Looks good to me. If you want, have a look at the one comment, I left.
I currently don't have the means to test the changes, but as long as CI passes that should be fine.

let _ =
sp_client.seek_track(new_pos as u32, playback.device.id.as_deref());
let _ = sp_client.seek_track(
Duration::milliseconds(new_pos),
Copy link
Member

Choose a reason for hiding this comment

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

Haven't thought about it properly, but now that they're using Durations for seek_track (again?), would it maybe be nicer to convert our input (new_pos) to a Duration and do the addition with the Durations?

and also resolve lint errors related to try_into()

Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
@BKasin
Copy link
Contributor Author

BKasin commented Sep 4, 2023

Resolved the lint error from the previous commit, and then changed new_pos to a duration (or I guess stopped changing it away from one). Tested by seeking ahead and then back 10 seconds and it works as it should.

mpris

Copy link
Member

@eladyn eladyn left a comment

Choose a reason for hiding this comment

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

That looks good to me, just one last comment. Then we should be good to go.

src/dbus_mpris.rs Show resolved Hide resolved
@eladyn
Copy link
Member

eladyn commented Sep 20, 2023

Looking at CI, it seems like we might need a MSRV bump? Would you be able to update that in the CI as well as in the Cargo.toml?

Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
@BKasin
Copy link
Contributor Author

BKasin commented Sep 20, 2023

It looks like the version of time required by cookie, cookie_store, and syslog went from 0.3.20 to 0.3.28 and that's what caused the bump.

Copy link
Member

@eladyn eladyn left a comment

Choose a reason for hiding this comment

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

Thank you!

@eladyn eladyn merged commit 0a15027 into Spotifyd:master Sep 20, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants