January 2024
Create Default Smart Playlist Templates
A problem with Holiday music hanging around your iTunes library all year long is that, without a cautious Smart Playlist strategy, Grandma Got Runover by Mannheim the Christmas Donkey Steamroller can disrupt your tranquility at any time of year. Like pool-side in August. And there is nothing un-cooler than that.
Now it's unlikely that I would create a regular playlist containing any speck of Holiday music during non-Holiday times of year on purpose. But you gotta watch them Smart Playlists. Thus, for a while, the criteria for every new Smart Playlist I created started with "Genre does not contain Holiday|Xmas|Christmas".
That's a pain to have to remember. And to enter for every new Smart Playlist.
However. The script Export Smart Playlist Criteria allowed me to export a Smart Playlist template that has several of my preferred Smart Playlist criteria already entered. These would include "Genre does not contain Holiday|Xmas|Christmas", "Live Update", and several other idiosyncratic restrictions and requirements. Now whenever I want to quickly create a new Smart Playlist I import that template XML "starter" and then choose "Edit Smart Playlist" from its contextual menu to add only minor finessing.
Now, whether you care to read on depends on whether you are thinking either:
"Dude, you can just keep a generic Smart Playlist in your sidebar and Duplicate it like whenever."
(in which case you're right, you win, like whatever) or:
"But Doug. You could write a script that automatically loads and selects your generic Smart Playlist template file by pressing a shortcut key!" (more…)
Library Benefits
A Correspondent observes that PDFs and digital booklets are no longer lodged in the "Music" library but in the "Books" library. Thus he laments that he is unable to access these books alongside the music tracks while browsing the "Music" library. While book-type tracks and music tracks can reside in the same playlist, yes, they do belong to different libraries. But creating a separate playlist for every album with a PDF or digital booklet doesn't seem very efficient.
I used Change Hidden iTunes Preferences to toggle the visibility of the "Library" library playlist. In the pic below it is listed atop the other library playlists. In the old days, this was the main library playlist and listed everything in the library. Well, it still does. When the "Library" is available, you can use the Column Browser to access an entire Album, which will include any associated booklet (providing the Artist/Album tags correspond correctly):
(The yellow highlight over the booklet is an artistic representation.)
Where'd My Half-Star Ratings Go?
I've been hearing from Correspondents that the half-stars they had meticulously set in their track ratings have disappeared. I think one of the v10 updates wiped out the half-star preference or something. Anyway, you can bring back the half-stars by doing the Terminal thing (quit iTunes first):
defaults write com.apple.iTunes allow-half-stars -bool YES
Or you can use Change Hidden iTunes Preferences which has an option to toggle 'em.
Just Play This Track and Stop Redux
For years many iTunes users and Correspondents have asked about a script that can just play the selected track and stop. Various methods using timers and delays and idle handlers were thrown at the challenge but nothing worked perfectly. But then: the iTunes Team quietly added a once parameter to the iTunes play command.
tell app "iTunes" to play item 1 of selection with once
Run that on a selected track and iTunes will play it once and then stop.
You know when they added it?
In iTunes 6!
Incredulous, I went back to my original write-up on iTunes 6 from October 2005. Whack! It was the only AppleScript change I even mentioned...and then promptly forgot about. I even managed at the time to write a Missing Menu Script using it.
In any case, all of this was precipitated by a posting at Mac OS X Hints awhile back, authored by fellow AppleScripter Laine Lee, which mentions the once parameter and just-play-once-and-stop trick.
I can't believe it took five years for me to rediscover it.
UPDATED: PDF Adder v3.2
PDF Adder v3.2 is a collection of three scripts (an applet, a droplet and a PDF Services workflow) that assist with adding and tagging PDFs in iTunes.
The latest version includes fixes to all three scripts, including a cancel loop bug and a misnamed bundle. I've also added Description to the tags you can apply. This is the PDF Services script in action, activated from the PDF popup in the Print Dialog:
I've written before on how the "Add as PDF to iTunes" workflow works great with Safari Reader and NetNewsWire.
UPDATED: Sundry Info to Comments v2.0
Correspondent Kerry E. emailed to ask if it was possible to somehow sort tracks by their file's file path or at the very least be able to create a Smart Playlist using the file path. This reminded me to dust off Sundry Info To Comments and I have updated it to v2.0. This script can paste various non-standard tag data and file info into each track's Comments tag, including the file path, parent folder path, file creation date, and so on. Thus you can use text in the Comments for SP creation and sorting schemes.
iTunes 10.1 Released
iTunes 10.1 is available via Software Update and its download page at Apple. Adds AirPlay and iOS 4.2 syncing support.
Dropped the License Sheet
Most all new downloads will no longer present you with a license sheet to Agree to before the disk image has loaded. Actually, this was meant to be more of an emphatic installation instruction than a license agreement. Anyway, couple Correspondents complained after downloading a hundred-milliony scripts from the site one afternoon that agreeing to the licensing sheet of each .dmg was growing tedious and they were turning into zombies. Or words to that affect.
Scripts designated as Retro Scripts do not get re-packaged so a few of those will retain the license sheet. But there aren't nearly a hundred-milliony of those.
UPDATED: AMG EZ Search v2.0
AMG EZ Search v2.0 will use the tags of the selected or playing iTunes track as the basis for a Song/Artist/Album search at the allmusic website. This version accounts for changes in the AMG site's search mechanism, can parse the stream title of a radio stream for tags if available.
Script Faves from Macworld
Macworld Senior Contributor Kirk McElhearn lists Ten great AppleScripts for iTunes 10 at Macworld. Thanks!