dougscripts.com

The iTunes 8.2 "none/all" Issue

iTunes 8.2 introduced a situation which affects iTunes AppleScript properties that use values of none and all. Here's how to fix it at your house.
- july 2009

 

AppleScripts that use the bare-word constant none or all with the special kind and song repeat properties of playlist or the video kind property of track can error in iTunes 8.2 (and later) if the erring AppleScript was compiled while using iTunes 8.1.1 or earlier. This affects many scripts you can download from this site. Too many, in fact, for me to go through and fix (I do not like the workaround to enable an erroring script to work on "both sides" of version 8.2; however, if Apple does not address the issue in a future iTunes release, I may have to go there). But you can much more easily fix the problem yourself.

Most likely this error will show up in scripts that attempt to segregate user-created user playlists. Since the user playlist class of playlists includes the library playlists, the special kind property of playlist (inherited by user playlist) will indicate whether the playlist is the Audiobooks, Movies, Music, Party Shuffle, Podcasts, Purchased Music, TV Shows, or Videos playlist, if it is a folder playlist, or if it is not special at all, ergo: none; no special kind.

(The workaround would require checking special kind against all of those other constants, "whose special kind is not Audiobooks and special kind is not Music and special kind is not...", rather than just checking for none. Kinda clunky. In fact, before special kind was introduced, it was even clunkier.)

A typical error message may look like "iTunes got an error: Can't get every user playlist whose special kind = «constant eSpKkSpN»". In this example, the original compiled AppleScript used the constant none where "«constant eSpKkSpN»" appears.

If this error occurs, you can simply re-save the AppleScript after replacing "«constant eSpKkSpN»" with none.

  • Snow Leopard (OS 10.6) and later: Navigate to your Applications/Utilities/ folder and activate the AppleScript Editor application by double-clicking its icon. When up and running its icon will be in the Dock.
  • Leopard (OS 10.5) and earlier: Navigate to your Applications/AppleScript/ folder and activate the Script Editor application by double-clicking its icon. When up and running its icon will be in the Dock.
  • Drag the file of the script that is giving you trouble to AppleScript Editor's Dock icon and the AppleScript will open in AppleScript Editor.
  • Locate any instances of «constant eSpKkSpN» and replace with the word "none" (no quotation marks). Most likely this will be used with statements that use special kind and video kind.
  • I'm afraid I have not run across the raw term for "all", but if you spy something that looks a little like the weird none constant in conjuction with a song repeat setting then change that to "all" (no quotation marks).
  • Press Command-S to re-save the script. Quit AppleScript Editor.
Site contents © 2001 - 2024 (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 be interrupting the one who is doing it.