iTunes Loved Alfred Workflow
Executes the following JavaScript via osascript
.
(function() {
var track = Application("iTunes").currentTrack();
var trackLoved = track.loved();
var notification = (trackLoved ? "UnLoved" : "Loved") + ": " + track.name();
track.loved = !trackLoved;
return notification;
})()
Then shows a notification.