Download hundreds (516 and counting) of AppleScripts for Apple's Media Apps that will help make managing your digital music and video collection easier and more fun!
downloaded 2m 19s ago
For Music Restore each selected track's artwork from an image file stored in its Album folder
downloaded 2m 48s ago
For iTunes Re-associate batch of dead tracks with files from selected folder
downloaded 13m 49s ago
Check all scripts from dougscripts.com installed on your computer for updates
downloaded 19m 51s ago
For Music Copy chosen tag info from one set of tracks to a different set of tracks
downloaded 20m 15s ago
For Music Perform search-and-replace on text in your choice of tags
downloaded 20m 29s ago
For Music/TV Title Cap various track tags, featuring editable exceptions lists
AppleScript is a simple Macintosh-only programming language that can control and automate actions on your Mac. AppleScript is already available on your computer as part of the macOS and many popular applications can be automated using AppleScript scripts. Scripts written for Apple's Music, TV and iTunes apps can manage files and track information, create playlists, interact with other applications, perform innovative tasks, and handle many kinds of chores with accuracy and precision which otherwise would be repetitive, laborious, and/or time-consuming.
Cool! Where Do I Start?
Start browsing the site by using the scripts ↓ Menu link above. AppleScripts are gathered into these general Categories:
- Managing Tracks
- Managing Track Info
- Managing Artwork
- Managing Playlists
- Controlling iTunes
- Exporting Info
Or use the search box at the top of every page to try and find something specific.
Not sure how to install AppleScripts? Here's a Download/Installation FAQ.
Check back often or follow me on Twitter @dougscripts, my YouTube channel, or subscribe to my RSS blog feed and 30 Most Recent Scripts RSS feed to stay notified about new and updated scripts and info.
The bug that some users were experiencing with Catalina scripts from this site has been discovered.
The code was not accounting for variation in system menus. Thus, the "invalid parameter" was an incorrect counting of menu items (the "itemArray").
My Mom isn't even going to care about that. What she and everyone else really wants to know is that I will update and re-post the affected scripts within a day.
I've said previously that the AppleScript scripting definitions for the Music and TV apps are pretty much lifted from iTunes. However, there are differences.
For example, a script that targets composer of a TV track will fail. Because TV doesn't use the Composer tag. Or the Album Artist tag. Or the artist property. Instead of artist, TV has a director property. And a Music track doesn't understand show, season number or episode ID; a TV track won't grok movement or work properties.
Stuff like that makes it difficult to write one script that can work in both Music and TV without doubling-up some of the code. Or adding some extra conditional tests. I'm not complaining; it is what it is, to be simply trite about it.
* * * * * *
When analyzing the pasteboard in a drag operation from the Music app, the dragging pasteboard types include “com.apple.tv.metadata”, but one would expect there to be “com.apple.music.metadata” type in place of—if not in addition to—the “tv.metadata” type. ¯\_(ツ)_/¯
* * * * * *
There is definitely an Artwork Issue. Files that I have downloaded from the cloud do not contain image metadata, but the artwork is certainly downloaded into the Music database because I can see it throughout my library. I just don't see the artwork being transferred to the files at all. The files do not have "Get Info" artwork and the artwork does not appear in a Quick Look panel. However, artwork appears as expected for files that have always been local.
* * * * * *
Files downloaded from the cloud also do not contain purchaser metadata. Not sure what that's about.
* * * * * *
The previous two metadata issues may be related.
* * * * * *
I still don't know what's causing the Invalid parameter error people are seeing with launching scripts. As far as I can tell, the issue "goes away" after a short time.
Frankly, there's so much stuff going on when you first launch anything in Catalina (with permissions and warnings and threatening security dialogs and other whatnots) that it just may be a minor system glitch.
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.
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.
I've bumped Dupin up to version 3.0. It is for macOS 10.15 and later only.
Dupin eliminates the drudgery associated with managing those irksome duplicated tracks in your Music library.
You won't be able to update to the new version of Dupin via Sparkle from the last version, v2.14.1, because that version can't run on macOS 10.15. So you'll have to get Dupin v3.0 right here on the website.
Dupin v3.0 is a free update for properly registered users and requires macOS 10.15 and the new Music app. A new registration code is US$15 and registrations older than five years can be upgraded for US$5. Download and try it free in Demo Mode. If you're staying away from Catalina for a while, Dupin v2.14.1 is still available to work with iTunes.
I have combined the utility of Super Remove Dead Tracks and List MIAs into a single script applet and Super Remove Dead Tracks is the runner-up in this contest.
The newest version of List MIAs for the Music app will not only display information about the files no longer associated with tracks in the library, it can also delete those "dead" tracks, which is what Super Remove Dead Tracks did (and can still do if you're using iTunes).
For the purposes of illustration, I Trashed some files for this screenshot:
That column on the left displays where Music thought I last left each file; but those files don't exist anywhere because I've already emptied the Trash. Now, I can have List MIAs simply delete all or a selection of those tracks.
List MIAs is free to use in Demo Mode, during which several features will be disabled: Delete Dead Tracks from Music, Reveal Selected Track in Music, Toggle Scan at Launch and performing a scan more than once per launch are inhibited. A registration code to unlock these features is US$2.99.
More information and download is here.
Some Correspondents have reported a problem when launching scripts for Catalina. The script doesn't launch and shows this error (screenshot from a Correspondent):
This was an issue that was reported several times during the beta period. I have been unable to replicate the problem myself on any Catalina installation. However, several users who reported it later found that—again, for unknown reasons—the issue eventually corrected itself.
It is baffling. The issue appears to occur during launch when the menu bar for the script is being populated. I'm keeping my eye on it, but, unfortunately, all I can recommend at this point is to check the script again after a few computer restarts.
When you update to macOS 10.15 and the new Music app, your current iTunes library will be imported just as if you were simply updating to a new version of iTunes. You can also open an iTunes Library.itl file as if it were a "multiple library" by press-and-holding Option as you launch Music to get the "Choose
iTunes Music Library" option.
I first saw this at the Apple Developer Forums. I tried it and it worked great. I haven't been using my main library while Catalina is still in beta because, well, it's my main library and Catalina is still in beta. But this was an easy way to have it available as on-demand optional library.
I copied the entire contents of ~/Music/iTunes/ to a new folder, except for my audio files which are stored elsewhere on an external drive; quit Music and restarted while holding the Option key. The dialog pops up asking you to "Choose Music Library" and I chose the "iTunes Library.itl" file from the folder I just copied the stuff to. Music then asks you to name and save the library. In a few minutes, the library was imported. The old "iTunes Library.itl" I selected was copied as a new new-style "Music Library.musiclibrary" and everything looked as I expected when the import was finished.
As of this date, it'll likely be a couple of weeks before Apple releases macOS 10.15 and the new Music app. The Music app is, essentially, iTunes stripped down to just its "music" components. You shouldn't have any troubles with it. Unless you bring your troubles with you.
If your iTunes library is a mess now, then your Music library will be a mess later.
Why not begin your Music experience with a sweet and tidy music library. This would be a good time to do some of that iTunes house-keeping you've been putting off: cleaning up tags, fixing artwork, paring dead tracks and non-essential playlists, minding the duplicates, backing stuff up and so on.
I keep a list of scripts recommended by task for just such occasions. You've probably still got a couple of weeks.
If you're on the macOS 10.15 beta, be sure to try out some of the Music-and-TV-ready scripts I've already posted.