Welcome Guest

Pages: 1 2
An action to tell me how many covers there are.
SnowdogPostMay 30, 2025, 13:30
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicAn action to tell me how many covers there are.

This is with regard to my feature request about knowing how many cover images I have loaded. (Because I'm currently editing batches of albums in a way that means knowing I have the right number of covers would be quite handy.)

As you can see from the first screenshot, it would be a right royal pain to have to count the covers manually. (Imagine if there were more. Hundreds, even!) But I now realise that my feature request could work just as well as an action. D'oh!

I think a shorthand version would be...

Assuming everything that's currently loaded in Yate is selected...
Count how many cover images are loaded...
Count how many source folders are holding all the tracks...
Make sure they agree.

(A bonus would be to know that if they don't agree, which folders are the ones without a cover image that's being used by the app.)

Earlier on I processed a batch of 77 albums & one of them had a cover image that was called "Absolution.jpg" & not "Absolution_Cover.jpg". Because I use the action you wrote which looks in each source folder for "cover.jpg" & imports that image, anything that is absent or that differs from that pattern does not get imported. So, yes, there was an image in the folder but it hadn't been imported. Which I think means that Yate can't compare the number of loaded images with the images in the folders, as that would (in theory) always be the same but wouldn't solve my issue. It would have to compare imported images with containing folders (I think).

Furthermore...

I've noticed that if I have a box set of albums & each album has a separate cover image in the folder (usually numbered to match the folder number), if all the cover images are the same image just with a different name, Yate knows that they are identical & will only show me one cover, even when all the albums are selected.

I'm not sure if that would be an issue for this action? In the set of folders shown in the screenshot, you'll notice that there are 4 different versions of the album The Defectors. Three of them have the entire audio-book as one track & one of them has it as chapters. All four of them use the same cover image with a name that reflects the version of the album they're for.

I suppose my point is that for this action to work, it has to be able to tell that 120 identical images with different names, one in each folder, will correspond to 120 folders. I just have no idea if that's an issue or not.

Does this make sense?
Image
Image

2MR2PostMay 30, 2025, 15:31
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAn action to tell me how many covers there are.

As you can see from the first screenshot, it would be a right royal pain to have to count the covers manually. (Imagine if there were more. Hundreds, even!) But I now realise that my feature request could work just as well as an action. D'oh!

I'm pretty sure I sent you an action called Artwork Count which you run by right clicking on the image well (the large one). The action is on the Artwork Actions submenu.

https://2manyrobots.com/actions/Artwork-Count.zip

The Artwork Count action will give you the number of unique images across all loaded files.

I think a shorthand version would be...

Assuming everything that's currently loaded in Yate is selected...
Count how many cover images are loaded...
Count how many source folders are holding all the tracks...
Make sure they agree.

Well I can tell you that every track in a folder has the same image and that there is only one. I can also tell you how many jpg images are in each folder (although there is no way to tell if it represents the same image in the files).

(A bonus would be to know that if they don't agree, which folders are the ones without a cover image that's being used by the app.)

This is easy.

Earlier on I processed a batch of 77 albums & one of them had a cover image that was called "Absolution.jpg" & not "Absolution_Cover.jpg". Because I use the action you wrote which looks in each source folder for "cover.jpg" & imports that image, anything that is absent or that differs from that pattern does not get imported. So, yes, there was an image in the folder but it hadn't been imported. Which I think means that Yate can't compare the number of loaded images with the images in the folders, as that would (in theory) always be the same but wouldn't solve my issue. It would have to compare imported images with containing folders (I think).

Absolution.jpg was not processed as that's not what you asked for. You asked me to look for images named text_Cover.jpg. There is no way Yate does image compares. It can tell if two images are defined by exactly the same bytes which is quite different from two images looking identical. Yate knows what's in the loaded files ... it can also read the folder contents of any directory.

I've noticed that if I have a box set of albums & each album has a separate cover image in the folder (usually numbered to match the folder number), if all the cover images are the same image just with a different name, Yate knows that they are identical & will only show me one cover, even when all the albums are selected.

True by design. Yate does not care what folder contains a track. Imaging loading 500 tracks all with the same image and having to look at 500 images in the artwork panel. If you change any of the metadata on an artwork item (eg. the description), Yate will display the images individually (even though they are the same) ... again as designed.

I'm not sure if that would be an issue for this action? In the set of folders shown in the screenshot, you'll notice that there are 4 different versions of the album The Defectors. Three of them have the entire audio-book as one track & one of them has it as chapters. All four of them use the same cover image with a name that reflects the version of the album they're for.

I suppose my point is that for this action to work, it has to be able to tell that 120 identical images with different names, one in each folder, will correspond to 120 folders. I just have no idea if that's an issue or not.

Does this make sense?

Yes but it's no an issue. What's displayed and what Yate knows are in the files is two separate things.

Let's assume the following:

- you want to ensure that all the tracks in a given folder have the same artwork items.

- You want to make sure that for every folder represented by the loaded files, there is the same number of jpg files in the folder as in the files in the folder. If there can be additional image files in a folder, let me know as I'll need some method of associating the images with those contained in the file. The filename of an image in the filesystem means nothing to Yate. If there can be additional images should I only match _Cover.jpg files?

- if either of the above tests fail ... you want to know where.

Let me know about the number of images in each folder and I'll knock off an action.

SnowdogPostMay 30, 2025, 19:55
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicAn action to tell me how many covers there are.

Okay, let's just check that I haven't given you a bum steer, here, because in my head it's not as complicated as that all makes it sound. (Of course, who the hell knows what's in my head?)

My workflow starts with sorting all the folders for a given artist or composer (or - in this specific case - Doctor Who Audio Dramas) in the finder. There are thousands, so I'm doing them in batches.

Once sorted, in each folder I'll have:
1. The tracks
2. A cover image
3. A folder called "Scans, etc." that anything else goes into.

It keeps it nice & clean & I have all my lovely actions in place to make light work of most things inside Yate.

Occasionally, when I cock up (like in the case of Absolution.jpg not having the word "cover" on the end) it doesn't come in with the "multi-cover imports" action, for the reason you quite rightly stated.

So here's my issue... The only way I ever find out that I've cocked up is to drop all of the albums into the library & watch them load in. Then, when one of them doesn't have a cover image, I can remove it from the library, sort out the issue with the cover & then put it back in again. Which can get fiddly & time consuming.

When I'm dealing with a small number... Say 4 albums, I can see at a glance that there are, for example, only 3 covers & go in to sort it out. When I have 4 albums loaded in Yate & I can see 4 covers, I'm good to go. But when there are tons of covers (like the batch of 77 I mentioned earlier) I can't see at a glance.

So all I think I need Yate to do is to say... You have 77 albums loaded/selected & there are (say) 75 images loaded. That's it. Then I can find which two are missing & fix them.

Is that simpler?

I mean, in actual fact, the "artwork count" action you mentioned may be sufficient, it's just that I have no way, within Yate, to know how many folders there are, in order to know that they correspond. But I could select the folders in the finder to get a number & then run the "artwork count" action see how many images there are. If they match, that would be job done.

Maybe I should just try that first.

2MR2PostMay 30, 2025, 20:10
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAn action to tell me how many covers there are.

Try this:

https://2manyrobots.com/actions/Cross-Check-Embedded-Artwork-Against-Folder-Contents.zip

The action is called Cross Check Embedded Artwork Against Folder Contents.

Select a bunch of files and run the action. You can run it as a regular action or by displaying the context menu on an artwork item and selecting the action from the Artwork Actions submenu.

It tests the following:

- all files in a given folder must contain the same images. (1 or more ... 0 is an error)
- for any given folder the number of jpg files in the folder must be the same as the number of images in the files contained in the folder.

If there are any errors they are displayed in the Log Viewer. The folder path is the header for an error.

If it needs tweaking let me know.

2MR2PostMay 30, 2025, 20:14
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAn action to tell me how many covers there are.

BTW: I felt this was better than displaying the number of images and the number of folders. As you've found, image displays will be coalesced if an image and metadata is the same. The supplied action looks for explicit errors rather than relying on counts.

SnowdogPostMay 31, 2025, 05:46
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicAn action to tell me how many covers there are.

Okay thanks, I'll give it a go!

I'm slightly confused about the part where it checks that every file in the folder has the same image applied to it because until I use the "Extract specific artwork from folder 'Cover.jpg'" action, which brings in the cover art & applies it to every file, each of the files in a given folder may have a different image applied to each track. (Some people do that with compilation albums or albums they've put together from bits & pieces.)

This will likely be because I don't really understand something or other.

Watch this space.

2MR2PostMay 31, 2025, 06:58
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAn action to tell me how many covers there are.

I'm very confused. Order is important in workflow. I thought that you wanted a means of verifying for large releases that you had the artwork applied as you wanted.

Assuming everything that's currently loaded in Yate is selected...
Count how many cover images are loaded...
Count how many source folders are holding all the tracks...
Make sure they agree.

SnowdogPostJune 1, 2025, 11:51
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicAn action to tell me how many covers there are.

I thought that you wanted a means of verifying for large releases that you had the artwork applied as you wanted.

I do want that & I've probably just confused you with all my prattle.

Let's see if I can clarify...

If I have 100 albums/folders loaded & selected in Yate & I run the "Extract Specific Artwork From Folder 'Cover.jpg'" I would expect to see this new action report:

Folders: 100
Cover images: 100

That's it.

As long as those two numbers agree, that's all that's important.

------------------

If I've buggered up somewhere, forgotten to add "cover" to a file name, not noticed that a couple of images are PNG, etc. then the action will have skipped them as they don't fit the pattern.

So, having run the "cover.jpg" action then the new action, if the two numbers disagree, I can go in & find the problem folders, fix the issues then clear out all artworks that did load correctly, run the "cover.jpg" action again, then run the new action to make sure the two numbers agree.

Does that help?

SnowdogPostJune 1, 2025, 12:18
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicAn action to tell me how many covers there are.

Maybe worth mentioning that I'm thinking in terms of two separate actions to do this.

It might be that an extension of the existing "cover.jpg" action could mean that I run it, it does what it always does & then ends with a report telling me, you know, 100 folders - 100 covers.

Then, if those two numbers are different I go in & investigate.

If the report included a mention of which folders were skipped, that might speed things up for me.

2MR2PostJune 1, 2025, 14:13
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicAn action to tell me how many covers there are.

So ... still not clear. I have never supplied an action named Extract Specific Artwork From Folder 'Cover.jpg. At least, I can't find it locally or on the web site.

I have supplied an action named: Extract Specific Artwork from Folder which looks for any .jpg file whose name contains an 'a' and imports it. Is this it?

I've uploaded an action to https://2manyrobots.com/actions/Validate-Cover.jpg-in-each-folder.zip

The action is named Validate Cover.jpg in each folder.

For each folder which contains a selected file, it makes sure that the folder contains a file named {anything}Cover.jpg

{anything} can be omitted.

If everything is good, a prompt is displayed displaying the number of folders and the fact that no errors were detected. If everything is not good a report is displayed in the Log Viewer. The offending folders are identified.

If you want to automatically call this new action after another, do the following:

- open the Action Manager
- select the older action.
- from the context menu do an Export.
- you can leave everything blank.
- check that you want a .zip file produced.
- email the action to support@2manyrobots.com and I'll update it for you

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.038 seconds.