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
1 changed files with 1 additions and 3 deletions

View File

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