Merge pull request #33 from Seirdy/fix/better-cover-file-discovery

Use better regex to find cover art
This commit is contained in:
Siddharth Dushantha 2020-03-01 12:38:20 +01:00 committed by GitHub
commit e5d047affe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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