I tried to upload the action, but I am told it is too large. Huh. Well then, here is the AppleScript which you tell LB to execute:
Code: Select all
tell application "System Events"
set iTunesisRunning to ((count of (every process whose name is "iTunes")) > 0)
end tell
set isTrackPlaying to false
if iTunesisRunning then
tell application "iTunes"
if current track exists then set isTrackPlaying to true
end tell
end if
if isTrackPlaying then
tell application "iTunes"
set CurrentTrack to name of current track
set CurrentAlbum to album of current track
set CurrentArtist to artist of current track
if (count of artwork of current track) > 0 then
set Art to (data of artwork 1) of current track
else
set Art to "DEFAULT"
end if
end tell
¬
display notification with title ¬
CurrentTrack subtitle CurrentAlbum & " – " & CurrentArtist
else
display notification "iTunes isn't playing a song." with title "Failed!"
end if