From ebf47b80757e968984d4c197f5f948d575f150fe Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 1 Mar 2020 01:37:46 -0800 Subject: [PATCH] Use better regex to find cover art Allow the cover filename to be preceeded by a track number, which sometimes happens with certain programs and ripping setups. --- kunst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kunst b/kunst index 8fa3186..cc33409 100755 --- a/kunst +++ b/kunst @@ -161,7 +161,7 @@ update_cover() { # use same regex to find album art as mpDris2 candidates=$( find "$DIR" -type f \ - | grep -iE '/(album|cover|\.?folder|front).*\.(gif|jpeg|jpg|png)' + | grep -iE '/(([0-9| |-]*)?)(album|cover|\.?folder|front).*\.(gif|jpeg|jpg|png)' ) while read -r CANDIDATE; do if [ -f "$CANDIDATE" ]; then