I want to delete [music] tracks from the main iTunes [10.7] library if they are in a user playlist.
I saw (on dougscripts.com) an approach where the database id was obtained from the track in the playlist and this was then used to delete from the main library. However, it does not seem to work:
delete (some track of thePlaylist whose database ID is (get database ID of deleteTrack))
returns error -1708 "... doesn't understand the delete message"
I think this is to do with a change to the way in which the main library is referenced, but if anyone can shed some light it would be much appreciated.
I found out what is happening: the tracks are shared from iCloud - via iTunes Match - which renders them un-deletable by AppleScript!
Retrieving data ...