Automator Apple Music playlist

I am trying to write an automator action that will play an apple music playlist when hitting F4. This works for normal playlists and smart playlists I have created with my own music but doesn't seem to work with Apple Music playlists like the A-list playlists.

Any ideas why this is?

macbook

Posted on Jul 29, 2016 4:10 AM

Reply
2 replies

Aug 2, 2016 6:58 AM in response to maca_lescour_

I have figured it out for anyone else trying to do this -



use application "iTunes"


property playlistURL : "itmss://itunes.apple.com/gb/playlist/the-a-list-electronic/idpl.4705ab1ed97c4f 4bb54f48940faf5623"

property playlistName : "The A-List: Electronic"

tell application "iTunes" to stop

set shuffle enabled to true


set playlistToPlay to a reference to subscription playlist playlistName of source "iTunes Store"

open location playlistURL


set i to 0

repeat while i < 30

delay 1

try

tell playlistToPlay to if it exists then

play it

if player state is playing then return

end if

end try

set i to i + 1

end repeat

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator Apple Music playlist

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.