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.
This commit is contained in:
Rohan Kumar 2020-03-01 01:37:46 -08:00
parent 32a60f8d07
commit ebf47b8075
No known key found for this signature in database
GPG Key ID: 36B154A782AEA0AC
1 changed files with 1 additions and 1 deletions

2
kunst
View File

@ -161,7 +161,7 @@ update_cover() {
# use same regex to find album art as mpDris2 # use same regex to find album art as mpDris2
candidates=$( candidates=$(
find "$DIR" -type f \ 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 while read -r CANDIDATE; do
if [ -f "$CANDIDATE" ]; then if [ -f "$CANDIDATE" ]; then