Song: Speed up Amarok song query

This commit is contained in:
Michael Straube 2016-12-27 10:45:07 +01:00
parent 85fdd54f95
commit 4b61dc1a9b

View file

@ -1249,9 +1249,7 @@ get_song() {
;; ;;
"amarok"*) "amarok"*)
artist="$(qdbus org.kde.amarok /Player GetMetadata | awk -F':' '/^artist/ {print $2}')" song="$(qdbus org.kde.amarok /Player GetMetadata | awk -F':' '/^artist/ {a=$2} /^title/ {t=$2} END{if (a && t) print a " - " t}')"
title="$(qdbus org.kde.amarok /Player GetMetadata | awk -F':' '/title/ {print $2}')"
song="$artist - $title"
;; ;;
"pragha"*) "pragha"*)