AppleScript
iTunes 7.2 AppleScript Changes
I'll be posting any AppleScript changes I find in iTunes 7.2 on this page.
UPDATED: Block Party! v1.5
I've updated Block Party! to v1.5. This script creates a "Block Party" playlist of random Artists and a specific number of their randomly selected songs arranged in a row ("two-fers", "three-fers", etc). Now works faster by virtue of being a compiled script, plus a few routines have been speeded up. Other changes include the ability to filter out movie and PDF tracks, filter out tracks smaller than a particular time limit, and filter out tracks of specific genres, the latter two of which are hackable in the body of the script.
NEW: Artist - Album - Disc from Selected Track
Artist - Album - Disc from Selected Track creates a new playlist--with the intention of burning its tracks to a CD--based on a single selected track's artist, album, and disc number. The tracks are ordered by album track number. There are other things to consider as well, so be sure to read the docs.
NEW: Number Song Names by Play Order
You know, there are probably four or five scripts here that attempt to number tracks or filenames the way people want. This has been an activity going back to SoundJam. Number Song Names by Play Order approaches the problem a little differently. The script will prefix each selected track's Song Name (I use the old "Song Name" nomenclature when actually the Song Name is now called "Name") with the number of its order in the selection (01, 02, 03...and so on). The selected tracks must be in a playlist that has been sorted by Play Order; ie, a user-created playlist, not a so-called "Master" playlist. The selection of tracks need not be contiguous, however it is important to have already established the Play Order. There's also an option to inhibit iTunes from renaming the tracks' filenames, since iTunes will automatically do that when you change a Song Name.
NEW: Get Airdate and Network
A Correspondent inquired whether the original airdate info for a TV Show track could somehow be obtained from the internet. While the IMDB offers this info, you can't really get at it so good with AppleScript, so I went with the--presumably--next best thing, which is IGN.com. Get Airdate and Network will use the show and episode names of a single selected TV Show track in iTunes to search the IGN.com website for that episode's page and then parse that page for the original airdate and network. You can then either open IGN.com's page for the episode or add the info to the selected TV Show's comment field. Note that results using this version are not one-hundred percent fruitful.
UPDATED: De-Genre v2.0
Eliminate superfluous Genre names fast with De-Genre v2.0. This script re-assigns the Library tracks of selected Genres to another Genre so that the original--and consequently un-assigned--Genres disappear from iTunes' Genre pop-up list. As you may know, you can make many superfluous Genres vanish from iTunes' Genres pop-up list simply by eliminating a reference to them in your tracks; when no tracks are assigned to a particular Genre, that Genre will be dropped from the list. (iTunes original Genre names cannot be removed this way; only those accumulated from other sources or created by you.)
UPDATED: Find Album Artwork with Google v2.5
Brett O'Connor's popular Find Album Artwork with Google has been updated to 2.5. This script will do a Google search for artwork based on the selected track's Album. This latest version updates image size settings to be in-line with Google Image's redesign and fixes a problem with an ampersand character breaking the search string.
MPAA Ratings
Several people have asked me if it is possible to add or change the MPAA ratings of TV Shows and Movies via AppleScript. From what I gather, the simple answer is no. As far as AppleScript goes, there is no such thing as a "MPAA rating" property which can be directly accessed. As far as I can tell (and I haven't spent a lot of time investigating this), video files downloaded from the iTunes Store contain the MPAA data. For instance, my "Daily Show" video files contain some info that looks like this: "us-tv|tv-14|500|". This can also be seen in the XML file in the Content Rating node--remember that the XML file is written out by iTunes, not read in by iTunes, so changing the XML file does nothing. I actually opened one of video these files in TextEdit, changed the "tv-14" of this string to "tv-ma", and after saving the file, "TV-MA" appeared in the Track Name of the show. It took quite a while, but I'm sure a perl routine could do it faster. But be that as it may, I am not sure how to add an MPAA rating to a file which you may have gotten by some means. I am aware that the program Losify (which I recommend!) is able to do it, but the file does need to be re-written.
NEW: Trackographer v1.0
Trackographer is a Stay-Open applet that will monitor iTunes and send tag information from each playing track (including radio streams if they provide track info) to a text file. Preferences can be set to include or not include various basic tags and to create a plain text file or a tab-delimited text file which can be imported into a spreadsheet.
NEW: Search Artists to Make Sort Artist
This script doesn't do anything you couldn't already do manually, but does put the whole process into a single script. Search Artists to Make Sort Artist will search for tracks whose Artist tag contains a user-entered search string. It will then ask you for a text string to use in each of those tracks' Sort Artist Tag. Or, rather than have the script automatically enter a Sort Artist, you can choose to display the results of the search in a new playlist to inspect them, then use Batch Set Tracks Sorting Tags to set the Sort Artist tag of just the selected tracks. FWIW.
