Tracks streamed from Apple Music do not return correct track information to Applescript

Originator:alexprice
Number:rdar://21674162 Date Originated:04-Jul-2015 12:48 PM
Status:Open Resolved:
Product:iTunes Product Version:12.2
Classification:Other Bug Reproducible:Always
 
Summary:
Tracks streamed from Apple Music (eg. For the "For You" tab) do not return a usable object to Applescript.  When asking iTunes for the "current track" with Applescript the returned object is an unknown type.

Steps to Reproduce:
1. Open iTunes, signed in to an account with Apple Music enabled.
2. Select the "For You" tab in the music section.
3. Browse into one of the suggested playlists and play a song.
4. Either open the included script file, or open Script Editor and create a new Applescript document pasting in the following Applescript:

tell application "iTunes" to get current track
tell application "iTunes" to get name of current track

6. Run the script (while music is still playing)

Expected Results:
There should be no error, and the result box at the bottom of the page should have the title of the currently playing song.  The "current track" object should probably be of type "URL Track", as tracks played from the radio are.

Actual Results:
The script editor shows a "Script Error": "iTunes got an error: Unknown object type." because the current track is not of a standard type (e.g. URL Track)

Version:
iTunes 12.2, running on any version of OS X.

Notes:


Configuration:
The user must be signed in to an Apple Music enabled iTunes account on iTunes 12.2 to experience this issue.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!