Seriously, I'm embarrassed to even be asking this.
I've got an Applescript that is supposed to build a playlist of a bunch of whole albums. Everything works fine, except for actually adding the tracks to the playlist. Here's the relevant code:
repeat with theAlbum in randAlbums
set these_tracks to (tracks of library playlist 1 whose album is theAlbum)
repeat with the_track in these_tracks
add the_track to playlist thePlaylist (* doesn't work *)
end repeat
end repeat
The error I get is "iTunes got an error: A descriptor type mismatch occurred."
randAlbums is a list of unique album names, and thePlaylist is a playlist that is created earlier in the script.
I've been banging my head against this for what feels like a week and I haven't been able to figure it out. Thanks in advance for any assistance you can offer :)