Fishysan wrote:Thanks for the info all.
Anyone have any luck displaying Apple Music artwork? The scripts here don't show data when you are listening to Apple Music "Radio Station" like Beats, or the featured stations. The iTunes app of course displays the album artwork for the track playing but the AppleScript doesn't get the artwork. The Indio trigger does trigger with a track change on radio stations..
Thanks!
For me, this code from above is grabbing artwork for the currently playing iTunes radio station:
- Code: Select all
tell application "iTunes"
set pd to data of first artwork of current track
end tell
To test this, I did a quick test script:
- Code: Select all
property fs : "Users:gregtreece:Pictures:MyArt.tiff"
tell application "iTunes"
set pd to data of first artwork of current track
end tell
set rn to (open for access fs with write permission)
try
write pd to rn starting at 0
close access rn
on error err_mess
close access rn
error err_mess
end try
tell application "Finder"
set file type of (fs as alias) to "tiff"
end tell
property pngFile : "Users:gregtreece:Pictures:iTunes.png"
property targetSize : 256
tell application "Image Events"
launch
set theImageReference to open fs
-- create the png file
scale theImageReference to size targetSize
save theImageReference as PNG in pngFile with icon
close theImageReference
end tell
The resulting iTunes.png file matches the current radio track.