Set Album Art Image Type to Front (Cover) [MM2/MM3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Set Album Art Image Type to Front (Cover) [MM2/MM3]

Postby bob61 » Sat Apr 05, 2008 9:09 am

As I've updated all my tracks (or at last 98% of them) to have a Album Art I found that a significant portion was added with the Album Art image types being set many different types, including Unspecified. As all my album arts were Front Covers I was looking for a way to quickly set all the image types. I found this script:

http://www.mediamonkey.com/forum/viewtopic.php?t=11035

It however had a function to also scan for multiple album art images and create a play list, this slowed down the processing. I didn't need that so I revised the original script for single purpose and added a couple of tweaks as well.

Changes from MoDemntia's original code:
' -Removed function to create playlist of tracks with multiple covers (speeds up processing)
' -Added function to use tracks selected instead of processing all visible tracks
' -Added information box if no tracks were selected
' -Added information box at completion of processing with # tracks processed and # tracks with covers updated

Here's my script based on MoDementia's original code referenced above. First time coding with MM script so if there's improvements to be made feel free to suggest ;) Thanks to MoDementia for his approval to post this revised script.

To install simply copy the script below and save into the Scripts/Auto folder.

To use - simply select the list of tracks you want to update and then select this script from the MM scripts list.

There are probably other scripts that have this feature bundled in, but sometimes you just want a single purpose tool and not an entire swiss army knife of gadgets. This worked for me and saved a ton of time - hopefully will have some benefit to at least another person or two. Enjoy!


Code: Select all
'==============================================================================
' MediaMonkey Script
'
' NAME: SetCovertoFront.vbs

' DESCRIPTION: Sets Cover Type to Front Cover
'
' AUTHOR: Bob61 (Based on original script FixCoverUnknown.vbs by MoDementia)
' DATE  : 04/04/08
' Version: 1.0 Original release
'
' INSTALL:
' - Copy script to MediaMonkey's "Scripts\Auto" folder
'
' The script needs MediaMonkey version 2.5.3 or above - works with MediaMonkey 3.0+
'
' Select list of songs to be processed. This script will then set all image types for selection to Front Cover.
'
' Proper credit to MoDemntia for his original script FixCoverUnknown.vbs
' I was looking for script to set covers types to Front Cover and found similar script from MoDemntia
' which I adopted for single purpose which is much faster processing for large selection of files.
'
' Changes from Original Script by MoDementia:
' -Removed function to create playlist of tracks with multiple covers (speeds up processing)
' -Added function to use tracks selected instead of processing all visible tracks
' -Added information box if no tracks were selected
' -Added information box at completion of processing with # tracks processed and # tracks with covers updated
'
'
' You can see original script in this forum:
'>> ForumURL: http://www.mediamonkey.com/forum/viewtopic.php?t=11035
'==============================================================================

Option Explicit     ' report undefined variables, ...

' SDB variable is connected to MediaMonkey application object

Sub OnStartup
 
    Dim MenuItem : Set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Scripts, 0, -1)
    MenuItem.Caption = "Set Album Art Image Type to Front Cover"
    MenuItem.Hint = "Changes Album Art Image Type to Front Cover for Selected Tracks"
    MenuItem.IconIndex = 12
    MenuItem.UseScript = Script.ScriptPath
    MenuItem.OnClickFunc = "SetCoverToFront"
 
End Sub

Sub SetCoverToFront(MenuItem)
 
  Dim objThisSongList, iCounter, Song, Album, AlbumArtList, xCounter, fCounter
  Dim CoverType, NeedsUpdate
  Set objThisSongList = SDB.CurrentSongList
 

  Dim Progress, ExpText
  Set Progress = SDB.Progress
  ExpText = SDB.Localize("Checking Album Cover Type... ")
  Progress.Text = ExpText
  Progress.MaxValue = objThisSongList.Count
 
  If objThisSongList.Count = 0 Then
    SDB.MessageBox "No songs selected!", mtError, Array(mbOK)
    Exit Sub
  End If

  fCounter = 0

  For iCounter = 0 to objThisSongList.Count - 1
    Progress.Text = ExpText & iCounter & " of " & objThisSongList.Count
    Set Song = objThisSongList.Item(iCounter)
    Set AlbumArtList = Song.AlbumArt
    NeedsUpdate = 0
    For xCounter = 0 to AlbumArtList.Count-1
      CoverType = AlbumArtList.Item(xCounter).ItemType
      If CoverType <>3 Then
        NeedsUpdate = 1
        AlbumArtList.Item(xCounter).ItemType = 3
   fCounter = fCounter+1
      End If
    next
    If NeedsUpdate = 1 Then
      AlbumArtList.UpdateDB
    End If
    Progress.Value = iCounter+1
  Next

SDB.MessageBox "Finished -"&iCounter& " Tracls Processed - "&fCounter&" Covers Updated", mtInformation,  Array(mbOK)

End Sub
bob61
 
Posts: 157
Joined: Sun Dec 09, 2007 4:52 pm

Re: Set Album Art Image Type to Front (Cover) [MM2/MM3]

Postby hatn » Tue Dec 30, 2008 10:55 am

well there was at least one other person :)
tx!
hatn
 
Posts: 11
Joined: Thu Dec 25, 2008 12:28 pm

Re: Set Album Art Image Type to Front (Cover) [MM2/MM3]

Postby steviegt » Sun Apr 05, 2009 6:16 am

I did as instrucred but the script does not show up in the Script menu. I recreated the .vbs file and put it in scripts/auto and launched MM. It still doesn't show up. How do I get this to show up so I can use it? I read thru the posts and I am in a panel that shows tracks so thats not it.

I also tried Album Art Tagger. The script works great but when I use the selection #9 Assign a cover art image and click Go, it does nothing to the selected file(s).
MediaMonkey Gold Lifetime v4.0.7.1511
Vision v2.0.0, MiniLyrics v7.5.24
Windows 8 Pro 64-bit
IE 10


"Being mean to someone takes more effort than being nice to them"
steviegt
 
Posts: 249
Joined: Tue Mar 17, 2009 8:39 am

Re: Set Album Art Image Type to Front (Cover) [MM2/MM3]

Postby ggibby » Mon Jun 04, 2012 3:07 pm

My thanks to Bob61, this is a great help for the OCD that results from clicking on MagicNodes and TaggingInconsistencies...

Seems to be working fine on my 8k 'Cover Type > Not Specified' tracks...

-G
ggibby
 
Posts: 43
Joined: Mon Feb 07, 2005 10:36 pm
Location: New Orleans, LA


Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 17 guests