Created
May 26, 2017 13:51
-
-
Save estum/bc5399008a2ab10d611920b0a8d1082b to your computer and use it in GitHub Desktop.
iTunes: Toggle loved of the current track
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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