INTERACT FORUM

More => Old Versions => JRiver Media Center 26 for Windows => Topic started by: Ferdi on August 19, 2020, 05:47:07 am

Title: Help please with expression language - count within and list results
Post by: Ferdi on August 19, 2020, 05:47:07 am
I've been fiddling around a bit, including with Zelda, but can't figure it out :(

My goal is to ensure that for any album, all tracks have the same cover art.
For that, I envision to have a list of albums that contain tracks with different images, and it's ok to assume is that images are identical if the size is identical.

My approach would therefore be to count instances of ([image height] - [image width]) within an album, and list all albums where number is greater than 1. I can't get it done though, even with the solution that blgentry, Arindelle and glynor had provided for a similar challenge a few years ago https://yabb.jriver.com/interact/index.php/topic,101624.msg7

Anyone? Thanks!
Title: Re: Help please with expression language - count within and list results
Post by: zybex on August 19, 2020, 07:07:45 am
Quote
(...) and it's ok to assume is that images are identical if the size is identical.

I think this is a wrong assumption. Most covert art images will instead have the exact same resolution (say 800x800), even if the image itself is different. You would need to also compare the filesize of the image to check if they're the same, but MC doesn't store that.

Perhaps you can use an external script instead to check the actual covert art files on each album folder.
Title: Re: Help please with expression language - count within and list results
Post by: Ferdi on August 19, 2020, 07:11:08 am
Thanks, zybex.
I agree, the assumption is not 'correct'. I'd be able to find many cases of inconsistencies though.
I store images in the music files, so wouldn't be able to find them in the folders.

(and thanks also for creating Zelda, even it that's a bit over my head)
Title: Re: Help please with expression language - count within and list results
Post by: wer on August 19, 2020, 12:10:51 pm
My goal is to ensure that for any album, all tracks have the same cover art.

This cannot be done within the confines of the expression language. You could make a guess, but no more.

To do this, you would have to use an external program, or visually scan.
Title: Re: Help please with expression language - count within and list results
Post by: JimH on August 19, 2020, 12:13:46 pm
I believe that all art within an album will normally be the same, unless you purposely paste different art.

You could test by pasting art into one track.  The others should eventually be populated with the same art.
Title: Re: Help please with expression language - count within and list results
Post by: Ferdi on August 19, 2020, 04:31:31 pm
Thanks for the feedback.

For some albums, I indeed have different jpgs cover art. Not sure where it comes from, but it's definitely the case. Oh well, no big deal.