samedi 29 novembre 2014

iTunes/Applescript: get all tracks from (incomplete) album


I try to write an Applescript that would sort playlists by album. That is, a playlist P might contain 20 tracks split on 4 albums (A1, A2…). Each album has 10 tracks, in other words, on this playlist, the albums on average only contain half of the tracks.


I have found a lot of examples where you can query iTunes for all tracks that belong to an album on the library level, typically something like this



set albumSongs to (every track of library playlist 1 whose album is currentAlbum)


while I want to do something like this



set albumSongs to (every track of playlist myPlaylist whose album is currentAlbum)


but compiling my example returns an error message Expected class name but found identifier. pointing at the track keyword in the line above.





Aucun commentaire:

Enregistrer un commentaire