hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
BSD 2-Clause "Simplified" License
5.08k stars 211 forks source link

MPRIS: Restructuring and cleanup #1515

Closed haruInDisguise closed 2 months ago

haruInDisguise commented 2 months ago

Describe your changes

My pr addresses some of the inconsistencies in ncspot's mpris implementation. While the previous logic is technically good enough, it is inflexible and reports redundant information. I've tried to address those issues to make it easier for software, that processes mpris events in some way, to accurately react to player updates.

Issue ticket number and link

This closes #1514

Checklist before requesting a review

Edit: An example of software that requires strict MPRIS compliance would be the MPRIS module for yambar that I am working on.

haruInDisguise commented 2 months ago

I've chosen my naming convention (:p) and also added an exception so clippy does not complain to us about enums starting with the same prefix.

hrkfdn commented 2 months ago

Looks good, let's get it in + sorry for the delay! :)

haruInDisguise commented 2 months ago

No worries! Thanks for taking the time!