Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save estum/bc5399008a2ab10d611920b0a8d1082b to your computer and use it in GitHub Desktop.
Save estum/bc5399008a2ab10d611920b0a8d1082b to your computer and use it in GitHub Desktop.
iTunes: Toggle loved of the current track
on run {input, parameters}
tell application "iTunes"
set theTrack to get current track
if theTrack's loved then
set loved of theTrack to false
display notification "Now is not loved" with title ¬
"iTunes" subtitle theTrack's artist & " - " & theTrack's name ¬
sound name "Tink"
else
set loved of theTrack to true
display notification "Marked as loved" with title ¬
"iTunes" subtitle theTrack's artist & " - " & theTrack's name ¬
sound name "sosumi"
end if
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment