Archive for the ‘None/All Bug’ Category
Nothing to do with Snow Leopard–what a relief, eh? I’ve updated seven scripts today:
- Assimilate View Options
- Batch-Delete Playlists
- Block Party!
- Compare Two Playlists
- Export Smart Playlist Criteria
- Move Playlists to Folder
- Selected Playlists To iPod
These seem to be the most popular scripts that are affected by the “none/all” issue introduced in iTunes 8.2. There may be a few others, but I haven’t gotten email feedback on those nor have I run across a problem with any other scripts I use regularly. But if you ever get a error like this:
…then let me know.
The “none” bug I described yesterday turns out to be a bit more extensive: it’s a “none/all” bug.
iTunes 8.2 introduces a bug whereby the the use of the none value with special kind and video kind, and the all value with song repeat in AppleScripts compiled in iTunes 8.1.1 and earlier will not work correctly in iTunes 8.2. I understand that Apple is aware of this situation and assume a fix will be forthcoming in a future version.
If you encounter an error caused by this bug, chances are you are running iTunes 8.2 and the script had been compiled and saved with an earlier version of iTunes.
The fix is to open the script in Script Editor, look for chevron-bound raw constants, and replace them with the appropriate bare-word value. For example, if you see «constant eSpKkSpN» change this to none. (I’m afraid I don’t know what the raw constant for “all” is, but it would appear with a song repeat command; song repeat takes the values “off”, “one”, and “all”). Then re-save the script; it will compile referencing iTunes 8.2 aete and will work fine. Such recompiled scripts, however, will then not work with pre-iTunes 8.2.
A little more about the “none” bug, mentioned earlier today. Any script compiled and saved before iTunes 8.2 which uses the “none” constant with playlist’s special kind property will error. Thus, if you get an error concerning “«constant eSpKkSpN»” then it is most likely this bug.
The fix, as I also mentioned earlier, is to open the script with Script Editor, making a note of whether the script’s format is compiled (.scpt or .scptd extension) or application (.app extension), and replacing any occurrence of «constant eSpKkSpN» with the bare word none. Then “Save as…” the script, making sure the File Format in the save dialog is set as you noted.
The script should run fine under iTunes 8.2, but, because it has been re-compiled, will not under iTunes 8.1.1 and earlier.
A script I had written a year ago looks for playlists whose smart is false and special kind is none. Since updating to iTunes 8.2 it is showing as raw «constant eSpKkSpN». The error is: “Can’t get name of every user playlist whose smart = true and special kind = «constant eSpKkSpN».”
If I open the script and change «constant eSpKkSpN» to “none” then save, all’s OK.