I've been using applescript widgets for my now playing setup as they are more predictable and stackable:
Just upgraded to Catalina, and I'm having trouble with converting the iTunes widget for the new Music app, specifically having trouble displaying the album art.
This code originally from the iTunes widget doesn't seem to work on Catalina:
if exists (every artwork) then
tell artwork 1
set srcBytes to raw data
-- figure out the proper file extension
if format is «class PNG » then
set ext to ".png"
else
set ext to ".jpg"
end if
end tell
set fileName to (("Users:" & (system attribute "USER") & ":Library:Application Support:BetterTouchTool:" as text) & "itunes_cover" & ext)
-- write to file
set outFile to open for access file fileName with write permission
-- truncate the file
set eof outFile to 0
-- write the image bytes to the file
write srcBytes to outFile
close access outFile
--return "album art success"
end if
I've done some debugging and it seems to be this line that is the issue:
set outFile to open for access file fileName with write permission
Anyone know how to fix?