When you get the tracks from the global playlist from Itunes/Apple Music with Applescript how do you get only filetracks
e.g
I can do
return tracks of playlist 1
but that will return all tracks including those on the cloud, I only want the one that are actually stored on the harddrive
I see you can use a filter but how do I filter to only retrieve filetracks ?
Robert's answer is almost right.
works for most instances of the AppleScript class
playlist, but not for all of them, because the elementfile tracksis only declared in various sub-classes, but not in theplaylistclass itself.For example, it does not work, if the playlist happens to be a
radio tuner playlistor anaudio CD playlist. They don't declare thefile trackselement.So before calling
file tracks of, you should check theclassproperty of the playlist to ensure your playlist object actually has afile trackscollection.