In case you didn't know, a track entry in Music (and previously, in iTunes) can have more than one artwork image associated with it. In such cases, the first of its artworks is what I call the "display artwork" and the other artwork is what Apple calls...the "Other Artwork":
The "Album Artwork" image on the left is what is displayed throughout Music/iTunes as the artwork for the track. The "Other Artwork" doesn't get displayed anywhere except in the Artwork pane of the Info panel. And "Other Artwork" doesn't always mean other artwork singular; you can really go to town and add thousands if you want (probably; didn't try; crazy idea). Incidentally, I'm pretty sure only one image can be written a track's file metadata and that will be the "Album Artwork" image.
In AppleScript, a track contains artworks and each artwork is accessed by index: artwork 1, artwork 2...artwork 4732. The "display artwork" is always artwork 1.
I am currently preparing an update to the script Re-Apply Downsized Artwork, which, among other things, can insert a new down-scaled image as a track's artwork 1. If the track already has artworks, they are "pushed up" such that the current artwork 1 becomes artwork 2, the current artwork 2 becomes artwork 3, and so on, so that the new image can become the new artwork 1.
Here's the bug-or-feature part of the essay (mostly bug I'm thinking): When you ask for any other existing artwork greater than 1, Music gives up a parameter error. This makes it impossible for AppleScript to access any artwork data other than artwork 1.
I may release the update to Re-Apply Downsized Artwork that side-steps the "insert" feature, but I thought I'd explain why I haven't released it yet at all.
Coverscope is an applet that helps manage track and file artwork. It will display both the track entry artwork and the artwork metadata from the track's file:
If one or the other is missing, the extant image data can be applied or embedded to the other. If both artworks are missing, an image from the clipboard can be pasted or an image file dragged to the Track entry artwork well to apply and embed it to the selected track.
Additionally, the Track entry artwork can be copied to the clipboard or exported as a file.
Coverscope is free to try in Demo Mode. In Demo Mode, any combination of features can be used up to five times per launch. A registration code to remove this restriction is US$2.99. More information and download is here.
I just updated the OS and the Music app. Happily, it appears the artwork issues are fixed and AppleScript can access the artwork data of a track (unless it's a file downloaded into the "Apple Music" folder). Additionally, playlist drags into and out of Folder playlists work as expected; it's just as tricky as it ever was in iTunes, but at least it's a sure thing.
There is still an AppleScript bug whereby delete playlist leaves a "ghost" playlist in the Sidebar until the next Music re-start. I have a few scripts in the pipe that rely on being able to delete playlists properly so this will need to be fixed before they can get posted.
Also, the reveal playlist command fails to scroll the selected playlist into view if it is not already in the Sidebar's view.
Otherwise, seems pretty solid.
Busy busy busy! So much so that the email newsletter I've been aiming to release still ain't got out and I have yet to even look at my App Store apps. The latter will not run in Catalina. But here's a batch of scripts that do:
This script will create a copy of the selected playlist or folder playlist with its tracks' play order shuffled--unlike Music's Shuffle modes which do not display the shuffled order of tracks.
Set the Plays of the selected tracks to a user-entered value (they will all be set to the same value). If this value is 0 then the Last Played date of each track will be erased. (The Music app has the ability to "Reset" Plays to 0 from a track's Show Info window.)
For macOS 10.15 Catalina and later only. Add or subtract a user-entered number from the current Plays of each selected track. If the resulting Plays is 0 then the track's Last Played date will be erased--as if it had never been played.
For macOS 10.15 Catalina and later. Set Last Played/Last Skipped date of selected tracks to a new date, with option to increase or decrease Plays/Skips, or set to no date and no Plays/Skips.
This script will reset the Plays, Last Played, Skips, Last Skipped, Remember Playback Position and Played properties of the selected tracks to default “never played” values. Music's own "Reset" command in a track's Info window may not be as thorough.
This latest version makes accommodations for macOS 10.15 Catalina and the Music app.
I ran across this over the Summer and I forgot to file a bug about until today. When an AppleScript performs delete on a playlist, the playlist is seemingly removed from Music but its name is still displayed in the Sidebar. If you click to select this playlist—that was ostensibly deleted—the view from an adjacent playlist is displayed.
This leads me to believe there's some clean-up or reload that fails to occur. If Music is quit and restarted, the Sidebar of playlists will display as expected; that is, the "ghost" playlist that was deleted will not appear.