Skip to content

Instantly share code, notes, and snippets.

@detecti1
detecti1 / gist:f7d04129ef9e2b5d4987a9dfcadbdec1
Created August 10, 2023 13:50
Set Loved and add apple music track to library via applescript
tell application "Music"
set loved of current track to true
set songTitle to name of current track
set songAlbum to album of current track
set songInfo to songTitle & " - " & songAlbum
try
duplicate current track to source 1
on error
try
tell application "System Events"