iTunes 7.0
iTunes 7.0 was announced and released on September 12, 2006 during a Steve Jobs Special Event coinciding with the Paris Expo. Also announced were iTunes Store Movie downloads, iPod upgrades and a first look at "iTV".
Major Upgrade
iTunes 7 has major GUI changes. The icon is new, the Source column icons are new, new View options--including a 3-D album artwork view called CoverFlow, changes to the entire GUI configuration. OK, you've probably seen what's new. Here's what's new as far as AppleScript is concerned:
New track Properties
album artist
This is a new tag used to better distinguish performers on a track. Of course, you can use it for whatever you want, but tracks from the iTS (no longer the iTMS) will, for example, list "Various Artists" as the album artist and the individual artist in each track's artist tag. I suspect Classical listeners will find this handy, too, for distinguishing conductors and ensembles from soloists.
gapless
This property takes a boolean true or false and flags whether the track should be played back as gapless. By the way, this setting along with "Remember [playback] position" and "Skip when shuffling" are now available in the Multiple Item Information panel when you have selected "Get Info" on a multiple selection of tracks.
skipped count, skipped date
These two properties store the number of times a track has been partially played (unlike "Last Played", which only tallies when the track has played all the way through), and the last time the track was partially played. The former is an integer, the latter a date.
episode ID, episode number, season number, show, video kind
These tags indicate various info about downloaded videos. Fairly self explanatory. The video kind property takes one of none, movie, music video, and TV show as values.
duration, start and finish properties as small reals
No doubt part of the gapless playback apparatus, duration, start and finish now are precise to a fraction of a second. Whereas they used to be an integer value (whole numbers in seconds) the times can now be expressed as something like 246.7856546 seconds, which is pretty precise.
tell application "iTunes" set {s, f} to {start, finish} of item 1 of selection log s log f end tell -- result: (*0.0*) (*540.280029296875*)
New playlist Properties
New "special kind" types are shown in bold: none, Audiobooks, folder, Movies, Music, Party Shuffle, Podcasts, Purchased Music, TV Shows and Videos.
The Source list has been updated to include new "Master" libraries. You identify them by getting the special kind of a playlist or by using a "whose" clause:
tell application "iTunes" set moviePlaylist to some playlist whose special kind is Movies end tell
Interestingly, not only do the Audiobooks, Movies, Music, and TV Shows Libraries have a unique special kind property, they also have their smart property set to true. However you cannot edit their criteria like normal Smart Playlists.
New artwork Property
downloaded
Interesting. iTunes no longer stores artwork in the actual track's file but organized in one of two folders in the ~/Music/iTunes/Album Artwork folder named "Local" and "Download". The "Local" folder contains artwork from your current tracks and the "Download" folder contains artwork retrieved from the iTunes Store. An artwork file in this folder is named so that it looks something like FF83764465D7B232-8ACA10CCDFF3572A.itc. The first number is the Library Persistent ID from the XML file and the second number is the track's Persistent ID. This is probably how iTunes keeps track of artwork for the Multiple Library feature.
Actually, Correspondent Brian Webster submitted a script which will re-embed artwork into the file. It's short enough that I can post it here (but I have also posted an updated verion of it to download). It works on a selection of one or more tracks:
tell application "iTunes" repeat with aTrack in selection repeat with anArtwork in artworks of aTrack if downloaded of anArtwork is true then set theData to data of anArtwork set data of anArtwork to theData end if end repeat end repeat end tell
Anyway, the downloaded property is true if the artwork was downloaded by iTunes. Not if the artwork accompanied the downloaded purchase, but if it was retrieved separately using the "Get Album Artwork" command. I suspect this may prove useful if, for example, you want to test your current tracks for those nice 600x600 artworks, delete them, and then re-download iTS artwork.
Troubles?
The convert command seems to ignore a list of CD track references and will instead import all CD tracks. I have been unable to come up with a workaround so I am presuming this to be a bug. Several of my scripts use this command, notably "Quick Convert", so I am anxious that this be tracked down.
I get a file permission error whenever I attempt to set the bookmarkable or shufflable property of a track:
tell application "iTunes" set sel to item 1 of selection try get shufflable of sel set shufflable of sel to true on error m log m end try try get bookmarkable of sel set bookmarkable of sel to true on error m log m end try end tell
More as it develops...