summaryrefslogtreecommitdiff
path: root/scripts/mpc_add_query.sh
blob: 03e39e0375bc96715fd0614018be582bd517e4e9 (plain)
1
2
3
4
5
6
7
#!/bin/sh

query=${1}
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