Managing Artwork
Some Artwork Scripts Updated
I got the first batch of some Catalina-ready artwork management scripts posted today. The four scripts are:
Save Album Art to Album Folder v6.0 will export the artwork of the selected tracks (or the tracks in a selected playlist) as an image file to the folder which contains each selected track's file--presumably each track's Album folder--or a single user-selected folder.

Applying Artwork in iTunes Corrupts Some MP3 Files
Over the past few months—I want to say since Mojave's release last year—I have gotten a few reports from users of my artwork scripts regarding a bizarre corruption issue when applying artwork to some types of MP3s.
Essentially, when artwork is applied to the MP3, its file "echoes" the last few seconds of audio data which increases the size of the file. Here is a screenshot sent to me by Correspondent Brandon Pfeiffer, showing the phenomenon in an audio editor (I think it's Fission; no matter, really):

Each "echo" represents a single attempt to add artwork. The new size is reflected in the Size and Time for the file in iTunes as well.
I have not been able to replicate this myself so it has been very difficult to figure out what's going on. However, Brandon did some experimenting and discovered some details. First, it's probably not an issue with the AppleScripts, since Brandon was also able to see this issue when he "manually" applied artwork via a track's Info panel.
Some other observations:
- The source of the MP3s did not seem to make a difference (home rips, Amazon downloads, etcetera)
- The image file being applied may be a factor, its size, type, and so on. However, Brandon could not find a consistent factor in this regard.
- Changing the ID3 version in iTunes had no effect.
- Re-converting a corrupted MP3 to MP3 in iTunes restored the file to its un-corrupted length. (Subsequently adding artwork to such a file, however, eventually corrupted it again.)
- The new file encoded by iTunes did not appear to have the issue at first (the song duration did not change); however, closer inspection using an audio editor (or even just playing via QuickLook in Finder) revealed that the duration had in fact changed, but was yet to be reflected in iTunes.
- Re-encoding the corrupted file using FFmpeg produced several of the following errors: “Header missing - Error while decoding stream #0:0: Invalid data found when processing input”
- Re-encoding the original downloaded source MP3 using FFmpeg did not produce any errors.
Sure beats me. I'll have more follow-up as it develops.
[Update: Several Correspondents have emailed to confirm that they have seen this behavior after manually editing artwork; AppleScript was not a factor.]
NEW: Artwork as Album Folder Icon
I usually recommend that you should just ignore the files in the iTunes Media folder. There's not much of a reason to go poking around in there if iTunes is managing your audio files. And interfering could disturb iTunes.
But plenty of iTunes users manage these files manually outside of the iTunes Media folder (although iTunes will still use this folder for Store downloads, CD rips, podcast downloads, and so on, in cases where it needs to know where to save something). For example, users who share their iTunes audio files with DJ'ing software may prefer to access these files manually. So it might be handy to make Album folders more easily identifiable by using the album artwork as the Album folder icon.
Artwork as Album Folder Icon will use the assigned artwork from the selected tracks as the icon for the folder containing each track's corresponding file in the Finder:
![]()
Just select some tracks, or a playlist of tracks, and begin processing with the script. If the tracks have artwork and their files are accessible, the individual album's artwork will be applied as the icon for the folder containing the files.
More information and download is located on this page.
Album Artwork in the Finder
I have seen some observations on the interwebs that some AAC and MP3 files are not displaying their artwork metadata as the file's icon under High Sierra 10.13.1. That is: the file for a track with assigned artwork in iTunes displays in the Finder with a generic audio icon rather than the album artwork. If I recall correctly, there have been periods over the years where this has both worked and not worked as expected.
I've paid little attention to this issue because I don't care about artwork for my audio files. Assigned artwork for tracks in iTunes is one thing, but how the files appear in the Finder is of little interest to me. But obviously this is something that many users have come to expect if not rely on.
My understanding is that Apple is aware of this issue. In fact, I'm running the latest High Sierra 10.13.2 beta and don't detect a problem. So don't sweat it.
UPDATE, December 6, 2017: This issue appears resolved after installing macOS 10.13.2.
Find Tracks with Multiple Artworks
This will corral all the tracks in the Music library that have more than one assigned artwork to a new playlist (whose name you supply; any existing playlist(s) with that name will be deleted beforehand):
tell application "iTunes"
try
set newPlaylistName to text returned of (display dialog ¬
"Enter a name for the playlist:" default answer "Multi-artwork tracks")
on error
return
end try
try
delete (every playlist whose name is newPlaylistName)
end try
set newPlaylist to (make new playlist with properties {name:newPlaylistName})
set musicLibrary to (get some playlist whose special kind is Music)
repeat with i from 1 to (index of last track of musicLibrary)
try
set aTrack to track i of musicLibrary
if (count of artworks of aTrack) > 1 then
try
duplicate aTrack to newPlaylist
end try
end if
end try
end repeat
display dialog "Done" buttons {"OK"} default button 1
end tell
Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a Script Bundle in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script menu. Launch the script and enter a name for the playlist; the default is "Multi-artwork tracks"; press OK.
NEW: Coverscope
So I guess artwork in iTunes drives some people crazy.
I have to admit I really don't give a poop about artwork most of the time. But I get that many people do. One thing that many of my OCD-About-Artwork friends insist upon is that a track's album artwork also be contained in that track's file's metadata; that the correct artwork is "embedded".
Coverscope is an applet that will show both the assigned iTunes track artwork and the local file's metadata artwork (if any exists) for the selected track.
Scrolling through tracks may turn up something like this, where the track entry in iTunes has artwork but its associated file does not have image data in its metadata:

Here's a track where both the iTunes artwork exists and its file's metadata contains image data:

There are features to Embed the track artwork to the file's metadata, Apply the metadata image data to the track, drag an image file to Apply and Embed, Copy Track Artwork to Clipboard and Save Track Artwork as File.
Coverscope is free to use in Demo Mode, during which the above features can be used in any combination up to five times per launch. An in-app purchase of a registration code for $1.99 will remove the restriction so it can be used smoothly without re-launching.
More information and download is available on this page.
NEW: Is Artwork Embedded v1.0
Is Artwork Embedded will examine the single selected track's audio file for image information in its metadata. If "embedded artwork" is found, the script will display something like this (where the image is the actual information retrieved from the metadata):

And if it can't detect any artwork metadata:

iTunes doesn't always transfer assigned track artwork to a file's metadata, although most purchased tracks and downloads will have it. Also, just because an audio file's Finder icon displays album artwork doesn't mean that that artwork is part of the file's metadata:

There may also be cases whereby some odd file has embedded artwork that is undetectable by the script (I suppose). But, generally: the script will always be right if it finds artwork metadata (because it displays it), but if it doesn't find artwork it could be wrong.
This script is free to use and is available to download from this page. Lordy, I hope you assign it a keyboard shortcut. I use Option-Command-I.
Delete Other Artwork
iTunes is able to accommodate more than one image for a track entry's artwork. What hasn't always been obvious is that the first artwork in an array of artworks in a track is the "display" artwork. Any additional artwork in the artworks array are spares. Modern versions of the iTunes Get Info Artwork panel now label images as "Album Artwork" and "Other Artwork".
Some people think that these "Other Artwork" have to go.
It is a simple matter to simply remove the other artwork from a track entry with an AppleScript. Here's one now that goes through each track in a selection and repeats through its artworks (if there's more than one artwork), removing the last artwork until there is only the first one left:
tell application "iTunes"
set selectedTracks to selection of front browser window
repeat with i from 1 to (count of selectedTracks)
set thisTrack to item i of selectedTracks
tell thisTrack
try
if (count of its artworks) > 1 then
repeat until ((count of its artworks) is 1)
delete its last artwork
end repeat
end if
end try
end tell
end repeat
end tell
Click the script icon above to download this script to Script Editor at your house and click "New Script" to allow it to open. Save it named whatever you like in your ~/Library/iTunes/Scripts/ folder (or wherever you put them). Select some tracks in iTunes and launch the script.
There's always the kid in the front who wants to know why you don't make a script like this that just works on the entire library. Well: iTunes can be kind of touchy when AppleScripting a large amount of artwork stuff. It may "go modal" as it updates its database and under such circumstances may block an AppleScript from continuing its operation. So I purposely used the selection object so that the script can be used piecemeal on a small batch of tracks at a time. Additionally, you might want to eyeball the "Other Artworks" of a track before you start blindly mowing them all down; in which case having to select the tracks manually compels you to be in control.
The routines are in a try block to skip over errors because of what I mentioned above about modality and also in case there's some image gunk in there that causes trouble. Because images downloaded from the internet that you use as album artwork are always pristine, right?
UPDATED: Sort by Artwork Size v1.1
Sort by Artwork Size v1.1 can write the size of a track's artwork (eg: "600x600") to choice of Category, Comments, Description or Episode ID tag (enabling tracks to be sorted by artwork size in a playlist using the chosen tag) and/or copy tracks with artwork less than or greater than a user-entered size to a new discrete playlist.

Note that if choosing the first option, the chosen tag will be re-written so it is best to choose a tag that is not already in use or not typically associated with a track's kind; for example, use the Episode ID tag (a TV Show tag) for music tracks or the Category tag (a Podcasts tag) for videos.
This latest version adds support for OS X 10.11 and accommodates changes in iTunes 12.2 and later.
Free to try for ten days, $1.99 thereafter. More info and download is on this page.


Kirk and I talk about album artwork in another one of our iTunes-oriented episodes of The Next Track podcast. Additionally, some useful AppleScripts for managing your iTunes artwork are featured.