Merge pull request #564 from mstraube/get-song-dbus

Song: enforce order artist - title in get_song_dbus()
This commit is contained in:
Dylan Araps 2016-12-24 20:52:37 +11:00 committed by GitHub
commit 3cbf8c2c12

View file

@ -1200,9 +1200,8 @@ get_song() {
dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\
awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\
awk -F '"' '/artist|title/ {printf $2 " - "}'
awk -F '"' '/artist/ {a=$2} /title/ {t=$2} END{print a " - " t}'
)"
song="${song% - }"
}
case "${player/*\/}" in