Cover file regex: file extension should be at EOL

File extensions (.png, .jpg, etc) should come at the end of the line.
mpDris2 also includes an EOL in its regex pattern: see line 108 in
491588a476/src/mpDris2.in.py (L108)
This commit is contained in:
Rohan Kumar 2020-03-01 01:45:14 -08:00
parent ebf47b8075
commit e3a60593cb
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 '/(([0-9| |-]*)?)(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