Calculate Cover Size 1.7 - Updated 23/10/2012

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.5 - Updated 03/05/2010

Post by trixmoto »

No idea, sorry. I've added it to my list to investigate though.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
scottycope
Posts: 24
Joined: Sun May 27, 2012 11:47 pm

Re: Calculate Cover Size 1.5 - Updated 03/05/2010

Post by scottycope »

Thanks for the update. I didn't see your post go to the next page and was beginning to feel left out. I appreciate your response. Please let me know if your investigation becomes fruitful as this script will do wonders for my organization.

Thanks again!
PatMcQ
Posts: 24
Joined: Wed Jan 09, 2008 5:00 am
Location: Oregon

Re: Calculate Cover Size 1.5 - Updated 03/05/2010

Post by PatMcQ »

Groovy script. Build it and they will come!

Since this script is strictly for utility (cleaning up the library art tags) and the data has no permanent value in the track tag, I don't want to alter the file and file's timestamp for it. Besides relying on timestamps for library maintenance and harddrive backups, unnecessarily altering a track file increases the odds (slim as that may be) that the file gets corrupted. Album art resolution is already stored in the Album Art tag and thus this script really should only be writing to the MM database. If the database gets corrupted for some other reason and you lose the temporary album art resolution data generated by this script, no big deal because you have to re-run it anyway, whenever you're editing album art.

Summary: I suggest storing this "resolution" data in the MM databse only WITHOUT having to disable the MM options "Update tags when editing properties" and "Modify timestamp when updating properties", as those are indespensible options that I don't what to forget to re-enable. And the script should finish much quicker if it's not writing to each of the track files.
MMuser2011
Posts: 1308
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

Re: Calculate Cover Size 1.5 - Updated 03/05/2010

Post by MMuser2011 »

PatMcQ wrote:Summary: I suggest storing this "resolution" data in the MM databse only WITHOUT having to disable the MM options "Update tags when editing properties" and "Modify timestamp when updating properties", as those are indespensible options that I don't what to forget to re-enable. And the script should finish much quicker if it's not writing to each of the track files.
The script should respect the setting "Modify timestamp when updating properties" from MM4. I don't want to set it for every add-on or script separately.
I would vote +1 for the option:
a) Write to MM.DB and track
b) Write to MM.DB only
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.5 - Updated 03/05/2010

Post by trixmoto »

At the moment the way the script works is that it updates the database for each track individually as it loops through, and then also adds the changed tracks to a list. At the end of the loop, the script calls "UpdateAll" on the list, which is what uses your settings to determine whether or not to update the files as well. I could easily add an option in to not call this final "UpdateAll".

In the meantime you could easily comment out the line, which is line 385, by adding an apostrophe at the front...

Code: Select all

' Call changelist.UpdateAll() 
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by trixmoto »

New version (1.6) is now available to download from my website. Changes includes...

- Added option to only store to database
- Fixed "Width x Height" not working with other options
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by Vyper »

There seems to be an issue with your site at the moment.
Stop Button Freak
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by trixmoto »

Yes, there is. My host are currently working to resolve it. Hopefully it'll be back up soon!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by Vyper »

It's baaack! :D
Stop Button Freak
vampire0slayer6969
Posts: 14
Joined: Sat Nov 05, 2011 1:52 am

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by vampire0slayer6969 »

Am a little confuse in how this scripts works....
can you tell me how it work step by step
I got it to go in MM but just not sure how to get my covers all the same size...
MMuser2011
Posts: 1308
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by MMuser2011 »

This script doesn't change your covers. It "only" calculate the size (height, width) and write the numbers to a custom field in the format you choose. It does not adjust the cover itself in any way.
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version
Nanya
Posts: 21
Joined: Wed Oct 03, 2012 8:04 pm

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by Nanya »

Think I may have found a bug...
If you have "don't populate tracks without cover art" checked, the script will only work with "Width x Height" and "Total; W x H".
With much trepidation, I rolled up my sleeves and delved into the code (it's my first time working with MM scripting). The problem seems to be line 316 which reads:

Code: Select all

If (ipop) And (res > 0) And (act <> "") Then
This should probably be either

Code: Select all

If (ipop) And ((res > 0) Or (act <> "")) Then
or even

Code: Select all

If (ipop) And (res > 0) Then
Checking for "act" is superfluous, you can rely on "cnt" (and therefore "res") even in Cases 7 and 8.
Last edited by Nanya on Wed Oct 03, 2012 10:28 pm, edited 2 times in total.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.6 - Updated 12/07/2012

Post by trixmoto »

Thanks, I'll take a look and fix this in the next version.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Calculate Cover Size 1.7 - Updated 23/10/2012

Post by trixmoto »

New version (1.7) is now available to download from my website. I have fixed the "Don't populate..." option not working in some modes.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
dtsig
Posts: 3588
Joined: Mon Jan 24, 2011 6:34 pm

Re: Calculate Cover Size 1.7 - Updated 23/10/2012

Post by dtsig »

I am having a problem I don't understand. I select all files and Tools->Scripts->Calculate cover size

In the window I set Count. Then after complete most look correct but here is an example of one that really isn't right. The count is 50100 but in actuality there are no images. So ... why would this happen?

Image
Where's the db and ini stored
Reporting Bugs
Where tags are stored

Not affiliated with MediaMonkey ... just a RABID user/lover
DTSig
Post Reply