diff options
author | Rasmus Steinke <rasi@xssn.at> | 2015-08-30 12:25:29 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2015-08-30 12:25:29 +0200 |
commit | c51c7af7c8b4ce8a7dcd5dba1867019f75f50949 (patch) | |
tree | 4f464f8b29446dc7eb44c09339447329552fec1a | |
parent | a24c1385b6e6cca2159ae6c0bbefdf711501a5d6 (diff) | |
download | perl-app-clerk-c51c7af7c8b4ce8a7dcd5dba1867019f75f50949.tar.gz perl-app-clerk-c51c7af7c8b4ce8a7dcd5dba1867019f75f50949.tar.xz |
fix tabs
-rwxr-xr-x | clerk | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -94,7 +94,7 @@ updateCache () { | sort -nr \ | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' \ | awk -F ' - ' '{ print $1 "\t" $2 " - " $3 }' \ - | sed 's,^\([^\t]*\t[^\t]\{40\}\)[^\t]*,\1,' | column -o ' ' -s $'\t' -t | uniq > $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" |