-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
Milestone
Description
While using the library, a function to find players instead of dealing with dbus would be nice.
Some research data from me:
According to MPRIS D-Bus Interface Specification;
Each media player must request a unique bus name which begins with org.mpris.MediaPlayer2.
And this project just pulled all the names and grepped the ones starting with org.mpris.MediaPlayer2;
function list-valid-player-targets {
echo "$(dbus-send --session --dest=org.freedesktop.DBus \
--type=method_call --print-reply /org/freedesktop/DBus \
org.freedesktop.DBus.ListNames | grep org.mpris.MediaPlayer2 |
awk -F\" '{print $2}' | cut -d '.' -f4- | sort )"
}