dougscripts.com

Music app

November 16 2019 - 2:57 pm

Accessing a Track's Multiple Artworks

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.

November 2 2019 - 3:15 pm

UPDATED: Coverscope v2.0

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.

And here's a cool trick I've been using Coverscope for:
(more…)

October 29 2019 - 4:00 pm

macOS 10.15.1 and Music v1.0.1

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.

October 29 2019 - 12:15 pm

Latest Batch of Catalina Updates

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:
(more…)

October 23 2019 - 2:39 pm

UPDATED: New Shuffled Playist v2.0

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.

More information for New Shuffled Playlist and download is here.

October 23 2019 - 12:41 pm

UPDATED: New Play Count v4.0

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.)

Also see Reset Plays, Add or Subtract Play Count and New Last Played Date. iCloud Music Library users should beware of a potential bug.

More information for New Play Count and download is here.

October 23 2019 - 12:40 pm

UPDATED: Add or Subtract Play Count v3.0

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.

Also see New Play Count and New Last Played Date.

More information for Add or Subtract Play Count and download is here.

October 23 2019 - 12:38 pm

UPDATED: New Last Played Date v5.0

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.

Also see Add or Subtract Play Count. iCloud Music Library/Apple Music users should be aware of a potential bug.

More information for New Last Played Date and download is here.

October 23 2019 - 12:36 pm

UPDATED: Reset Plays v2.0

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.

More information for Reset Plays and download is here.

October 11 2019 - 11:07 am

AppleScript delete playlist Bug

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.

Site contents © 2001 - 2019 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not interrupt the one doing it.