Commit 3cbf8c2c authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

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

Song: enforce order artist - title in get_song_dbus()
parents 8e971f88 e9132ca2
...@@ -1200,9 +1200,8 @@ get_song() { ...@@ -1200,9 +1200,8 @@ get_song() {
dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \ dbus-send --print-reply --dest=org.mpris.MediaPlayer2."${1}" /org/mpris/MediaPlayer2 \
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\ org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\
awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\ 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 case "${player/*\/}" in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment