INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Help please with expression language - count within and list results  (Read 770 times)

Ferdi

  • World Citizen
  • ***
  • Posts: 195

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!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Help please with expression language - count within and list results
« Reply #1 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.
Logged

Ferdi

  • World Citizen
  • ***
  • Posts: 195
Re: Help please with expression language - count within and list results
« Reply #2 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)
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Help please with expression language - count within and list results
« Reply #3 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.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Help please with expression language - count within and list results
« Reply #4 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.
Logged

Ferdi

  • World Citizen
  • ***
  • Posts: 195
Re: Help please with expression language - count within and list results
« Reply #5 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.
Logged
Pages: [1]   Go Up