I am trying to make an AppleScript that automatically adds the current track that I am listening to on Apple Music to my library.
What I have done so far is set the option "Add songs to Library when adding to playlist" to true and then used the following AppleScript code below:
tell application "iTunes"
duplicate current track to playlist "New Songs"
end tell
What happens is it adds the song to the playlist and then it is automatically removed from the playlist and it is not added to my library.
When I add the song to the playlist manually, the track stays in the playlist and gets added to my Library.
How am I to get ScriptEditor to save the current track to my library?