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

Functionality to retrieve the unique part of a player's bus name? #53

Closed
InputUsername opened this issue Apr 6, 2020 · 4 comments
Closed

Comments

@InputUsername
Copy link
Contributor

InputUsername commented Apr 6, 2020

Hi, I'm developing a tool that uses mpris-rs, and recently I've run into an issue where my tool identifies music players by their MPRIS identity, whereas other tools (eg. playerctl) extract the name from the player's bus name. This results for example in a player reporting as "Spotify" (MPRIS identity) vs "spotify" (the unique part of the bus name org.mpris.MediaPlayer2.spotify). Obviously extracting this name is trivial, but I thought it might make sense to add it to mpris-rs for ease of use. What are your thoughts?

Thank you for maintaining this great library!

@Mange
Copy link
Owner

Mange commented Apr 7, 2020

Sure thing, a PR for this would be welcome.

But I don't really understand why the player's identity property doesn't work for you.

@InputUsername
Copy link
Contributor Author

Alright, PR coming up.

I'm not sure why it's needed either. Playerctl apparently identifies players by their bus name instead of the identity property. One of my users wanted to be able to use playerctl's list of player names to whitelist music players with my application. The identity property differs from the bus name for some players, so this didn't work before.

It's a minor thing, but I thought it could be useful to include in mpris-rs.

@Mange
Copy link
Owner

Mange commented Apr 8, 2020

Sounds reasonable. I was mainly wondering if it would be better to expose the whole thing instead since it might be so app-specific to want that specific part.

Maybe both?

I'll have a look at your PR the next time I'm at my computer

@Mange
Copy link
Owner

Mange commented Apr 11, 2020

Fixed now in master.

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

No branches or pull requests

2 participants