iTunes 12.3: "shuffle" and "song repeat" AppleScript attributes defunct
| Originator: | iospiritongt | ||
| Number: | rdar://22724720 | Date Originated: | 16-Sep-2015 09:19 PM |
| Status: | Open | Resolved: | |
| Product: | iTunes | Product Version: | iTunes 12.3 (12.3.0.44) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
I, and many others, have reported this - seemingly - simple bug in iTunes' Applescript support before. Seeing as it remains unfixed with this update again, I'd like to file it again - as a reminder that this issue continues to exist and have a negative impact on the user experience of many of iTunes' most loyal fans and users.
The "song repeat" and "shuffle" properties of the playlist object are defunct. iTunes always returns "off" for song repeat and "false" for shuffle, irrespective of what the user set in the user interface. Setting the properties results in an error.
Steps to Reproduce:
1. Open iTunes
2. Play any song
3. Turn on shuffle
4. Select "one track" for "Repeat" in the Playback menu
5. Enter this AppleScript in Script Editor and run it:
tell application "iTunes"
{song repeat, shuffle} of current playlist
end tell
6. Enter this AppleScript in Script Editor and run it:
tell application "iTunes"
set song repeat of current playlist to off
end tell
7. Enter this AppleScript in Script Editor and run it:
tell application "iTunes"
set shuffle of current playlist to false
end tell
Expected Results:
In reaction to executing the scripts of steps 5-7:
Result for 5: { one, true }
Result for 6: song repeat is turned off
Result for 7: shuffle is turned off
Actual Results:
In reaction to executing the scripts of steps 5-7:
Result for 5: { off, false }
Result for 6: song repeat is not turned off, error -10006 is returned, indicating the value can't be changed
Result for 7: shuffle is not turned off, error -10006 is returned, indicating the value can't be changed
Notes:
This issue has been around for several major iTunes versions and has had a major impact on how third party remote control software can provide access to features like shuffle and song repeat.
The only - fragile - workaround we found is to use UI scripting, which comes at a huge performance penalty and requires the user to allow accessibility access in the Privacy settings first.
I hope that, in filing this radar, Apple will address this issue, so we can return to offering an excellent user experience. The current, UI scripting based user experience is below your and our standards and makes both iTunes and our software look unstable and bad.
I will happily provide any additional info if you need any.
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!
Apple Developer Relations 16-Sep-2015 03:34 PM
We need more information to investigate this issue.
Please provide Charles logging.
Use these steps to gather Charles logs: 1. Download and install Charles app from www.charlesproxy.com/download/ 2. Launch Charles 3. Go to Help > SSL Proxying > Install Charles Root Certificate... (Make sure the Charles Proxy Custom Root Certification is in the Keychain Access) 4. If asked, grant Charles privileges to configure your Network Settings 5. Go to Proxy > SSL Proxy Settings… 6. Enable SSL Proxying 7. Select Add and enter * for Host and Port 8. Launch Keychain Access app 9. Find "Charles Proxy Custom Root Certification" and open it 10. Disclose the Trust triangle, then change "When using this certificate" to "Always Trust" 11. Launch Terminal app 12. Enter this command: defaults write -g AppleIDAuthSupportNoPinning -bool YES
You will now be setup for collecting logs. Run Charles, reproduce the issue, and attach the log to the Bug Report. Note, that with Charles running, some Internet functionality could possibly be affected and non-functional.
Disable Charles after you are completed to prevent continued logging and avoid possible security issues: 1. Select “Stop Recording" 2. Go back to Proxy > SSL Proxy Settings and remove the location that was added in Step 7 3. Quit Charles (delete it if you like) 4. Open Keychain Access and delete "Charles Proxy Custom Root Certificate" 5. Open Terminal, and enter "defaults delete -g AppleIDAuthSupportNoPinning"
Please provide your response or results by updating your bug report.