Skip to content

[bug] Playerctl is too restrictive in matching a media player instance #198

@xPMo

Description

@xPMo

I use KDEConnect, which permits me to remotely control media in-between my laptop/desktop/phone.

However, the player names reported by playerctl are like the following:

$ playerctl -l
kdeconnect.mpris_e3c8035c2d55bf42ff347d4b0a60f4ac
kdeconnect.mpris_da39a3ee5e6b4b0d3255bfef95601890
kdeconnect.mpris_afd807095922a35fd0fd40b59abcf27c
strawberry

It is unwieldy to specify the full strings for these players. Multiple players from a single remote host will show up as multiple kdeconnect.mpris_[hash] on the local host. Also, Firefox uses something like firefox.instance[num].

Suggested solution:

Implement glob matching for player lists. Interpret playerctl -i 'kdeconnect.*,firefox.*' to ignore all matching players.

This kind of matching could also be useful in -p to specify preferences but allow any player to be controlled:

playerctl -p 'strawberry,spotify,*'   # prefer local strawberry and spotify, but if neither exists, control the first available player

Is this in-scope, or is scripting on the output of playerctl -l preferred?

Thank you!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions