From c51c7af7c8b4ce8a7dcd5dba1867019f75f50949 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sun, 30 Aug 2015 12:25:29 +0200 Subject: fix tabs --- clerk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clerk b/clerk index 9ddad08..33fc95e 100755 --- a/clerk +++ b/clerk @@ -94,7 +94,7 @@ updateCache () { | sort -nr \ | awk '{for (i=2; i $HOME/.config/clerk/latest.cache + | sed 's,^\([^\t]*\t[^\t]\{40\}\)[^\t]*,\1,' | column -o $'\t' -s $'\t' -t | uniq > $HOME/.config/clerk/latest.cache mpc --format '[%albumartist%|%artist%]\t(%date%) - %album%' \ search filename '' \ | grep -v '^ - ' \ @@ -1003,10 +1003,13 @@ TRACK_TEMP=$((echo -e "0 Return to Browse Menu\n---"; cat $HOME/.config/clerk/l elif [[ "$TRACK" == "${add}: Add, ${insert}: Insert, ${replace}: Replace (Default)" ]]; then addLastMod else - artist=$(echo -en "$TRACK" | awk -F "\t" '{print $1}' | sed -e 's/[[:space:]]*$//') - group2=$(echo -en "$TRACK" | awk -F '\t' '{print $2}'| sed -e 's/[[:space:]]*$//') + artist=$(echo -en "$TRACK" | awk -F '\t' '{ print $1 }' | sed -e 's/[[:space:]]*$//') + group2=$(echo -en "$TRACK" | awk -F '\t' '{ print $2 }' | sed -e 's/[[:space:]]*$//') album=$(echo "$group2" | awk -F " - " '{print $2}') date=$(echo "$group2" | awk -F " - " '{print $1}' | awk '{print substr($0, 2, length($0) - 2)}') + + echo -e "${TRACK}\nartist: ${artist}\nalbum: ${album}\ndate: ${date}" + if [[ $val -eq 11 ]]; then mpc search date "$date" album "$album" albumartist "$artist" | mpc insert entry="$TRACK" -- cgit v1.2.3-24-g4f1b