summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xspotify-scrobble.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/spotify-scrobble.sh b/spotify-scrobble.sh
index 004b81b..e9675e9 100755
--- a/spotify-scrobble.sh
+++ b/spotify-scrobble.sh
@@ -36,8 +36,8 @@ do
metadata=`dbus-send $DBUS_ARGS string:Metadata`
artist=`echo "$metadata" | grep -A2 "\<artist\>" | tail -n1 | cut -d '"' -f 2`
- title=`echo "$metadata" | grep -A1 "\<title\>" | tail -n1 | cut -d '"' -f 2`
- album=`echo "$metadata" | grep -A1 "\<album\>" | tail -n1 | cut -d '"' -f 2`
+ title=`echo "$metadata" | grep -A1 "\<title\>" | tail -n1 | sed 's/.*string \"\(.*\)\"$/\1/g'`
+ album=`echo "$metadata" | grep -A1 "\<album\>" | tail -n1 | sed 's/.*string \"\(.*\)\"$/\1/g'`
duration=`echo "$metadata" | grep -A1 "\<length\>" | tail -n1 | awk '{ print $3 }'`
[ -n "$duration" ] && duration=`expr $duration / 1000000`