summaryrefslogtreecommitdiff
path: root/scripts/mpc_add_query.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-05-04 01:15:19 +0100
committerdavidovski <david@davidovski.xyz>2024-05-04 01:15:19 +0100
commit416cb1a8dd5bf3ed6f426048843c95c2e2550f27 (patch)
tree023a75cf0b5926fa25c62f6be923e589bfab0d57 /scripts/mpc_add_query.sh
parent2596f818e085ed724597ecb0028ec2536392203b (diff)
add more transparency
Diffstat (limited to 'scripts/mpc_add_query.sh')
-rwxr-xr-xscripts/mpc_add_query.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/mpc_add_query.sh b/scripts/mpc_add_query.sh
index 08a1c20..03e39e0 100755
--- a/scripts/mpc_add_query.sh
+++ b/scripts/mpc_add_query.sh
@@ -1,5 +1,7 @@
#!/bin/sh
query=${1}
-cd ~/music
-find . -iname "*$query*" -type f | while read -r line; do echo "$line"; mpc insert "${line#./}"; done
+mpc -f "%title%[\t\t%artist%][\t\t%album%]\t\t%file%" listall | grep -i "${query}" | rev | cut -f1 -d' ' | rev | while read -r track; do
+ echo "$track"
+ mpc insert "$track"
+done