Help with regexp for local cover art match

Hi there, first time writing here. Still in the process of setting Picard up the way I imagine. Currently my Picard is downloading available cover art in a subfolder “caa”. If I wanna repeat the scan later to check for changes or make adjustments to my file naming scheme I don’t want Picard to download the images again but to find the local files in the subfolder.

I don’t have much experience with regexp. Can somebody help me out adjusting the default line so that Picard can see the already locally saved artwork?

This is the default regexp
^(?:cover|folder|albumart)(.*).(?:jpe?g|png|gif|tiff?|webp)$

Thanks!

Does putting the caa folder in front of the expression like below work?

^caa/(?:cover|folder|albumart)(.*).(?:jpe?g|png|gif|tiff?|webp)$

Sadly no. Picard still redownloads all images from CAA. I think I tried some variations of it but failed to find the correct solution. Right now it’s still an option to just turn off the cover art download for repeated scans. But I’d love to see a working regexp for this.

As an additional note. I download all available covertypes from CAA not just the front. For the correct relation to the different types I probably have to alter the regexp further?

You have to put the local files cover art provider on top of the list before the CAA

Likely yes, currently it only considers files starting with cover, folder or albumart. But you could just use all the image files:

^caa/(.*).(?:jpe?g|png|gif|tiff?|webp)$
1 Like

Okay, we’re getting there - thanks. The subfolder still seems to be an issue. So I just tested the case when moving all the coverart images to the same folder as the audio files. When I use this regexp then it works perfectly:

^(.*).(?:jpe?g|png|gif|tiff?|webp)$

Does the local files regexp feature even support folder navigation?

Honestly I don’t know, but can check later. But I thought to remember someone getting this to work. If it does not support this we should add it I think.

2 Likes

It isn’t meant to work with a subfolder in the regex.

The pattern is matched against filenames not filepaths.

5 Likes

Thank your for the explanation.

Would this be an option for a future update? I think there is an argument for this functionality since the user is allowed to specify a subfolder in the main “Cover art” tab.

Maybe it isn’t even neccessary to alter how the regular expression is implemented but instead to add an addtional setting in the “Local Files” tab to specify the filepath. Similar to the setting in the main tab.

1 Like