iTunes 12.2
Share iTunes XML with other applications
iTunes 12.2 has a new setting in the Advanced pane of Preferences:
If you download and use any of my apps or scripts you should probably leave that checked. In fact, if you use any software that may interact with iTunes you should leave it checked. The iTunes XML file is a way for other applications to easily get information about your current iTunes library. Denying access to this file will most likely cause these apps to fail.
I have already gotten reports of users experiencing mysterious issues with my software, only to find out they had unchecked this preference. I'm not sure what issues this setting is supposed to address but unless you are aware of a particular issue, I don't see why you shouldn't leave it checkmarked.
Update October 2, 2015: It appears that iTunes may install with this setting un-checked.
Update November 1, 2015: This Apple support document explains that iTunes 12.2 and later does not automatically create a "legacy" iTunes Library XML file and thus this setting will be off by default.
Dragging from Audiobooks Still Fails
This has been a problem for a couple of versions now. You can't drag tracks from the "Audiobooks" library. There's simply nothing in the "Tracks" node of the dragged pasteboard. Here's what the pasteboard looks like in Console after trying to drag a track from the Audiobooks library to my app Join Together:
iTunes 12.2 and AppleScript Issues, Volume 1
The current track and current playlist properties return a -1731 "unknown object type" error when run against a currently playing Apple Music track. That's going to be a problem for scripts and apps that use those properties to identify a playing track. I couldn't say if this is intentional or a bug.
The iTunes XML reports the main Library name as "####!####". This is not necessarily AppleScript related, but several of my scripts may refer to this "Master" playlist by obtaining its name from the XML.
More as it develops.
Cute New iTunes track Property
It's loved:
tell application "iTunes"
set sel to selection
repeat with aTrack in sel
try
set aTrack's loved to true -- or false if un-loved
end try
end repeat
end tell
The playlist also has a loved property. track also has album loved.
UPDATE: Unfortunately, current track and current playlist are broken for Apple Music tracks. So changing the loved property of a playing Apple Music track can't be done.
iTunes v12.2, Apple Music and AppleScript
Today, Apple released a new version of iTunes for OS X that accommodates its new MUSIC service, comprising: Beats 1 global 24/7 radio; algorithm- and human-curated playlist streams (replacing iTunes Radio); "Connect", the social media component; and the ability to play tracks streamed from Apple's music catalog alongside your current library tracks.
Apple did not make the new iTunes app available to developers before its official release and, of course, the Apple Music services weren't available until today either. So I had to wait like everybody else to see what AppleScript changes may have been wrought upon the latest iTunes app. I'm primarily concerned with still being able to manage my own media library with AppleScript and, if possible, accommodating any streaming Apple Music tracks that I may mix in with them.
There are changes in iTunes 12.2 that will require several if not many scripts and apps to be updated. This is going to take me some time to ascertain, but I will report the issues when I have figured them out.