summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-08-30 12:25:29 +0200
committerRasmus Steinke <rasi@xssn.at>2015-08-30 12:25:29 +0200
commitc51c7af7c8b4ce8a7dcd5dba1867019f75f50949 (patch)
tree4f464f8b29446dc7eb44c09339447329552fec1a /clerk
parenta24c1385b6e6cca2159ae6c0bbefdf711501a5d6 (diff)
downloadperl-app-clerk-c51c7af7c8b4ce8a7dcd5dba1867019f75f50949.tar.gz
perl-app-clerk-c51c7af7c8b4ce8a7dcd5dba1867019f75f50949.tar.xz
fix tabs
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk9
1 files 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<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"