Archive for the ‘Managing Artwork’ Category

October 31 '14 - 3:06 pm
Save Current Track’s Artwork

I don’t know why you’d want to do this on any kind of regular basis, but I thought it was kinda fun for a Friday afternoon. I wanted to see if I could save artwork from iTunes Radio tracks, but it works with whatever the current track is:

tell application “iTunes”

try

if player state is not stopped then

set alb to (get album of current track)

tell artwork 1 of current track

if format is JPEG picture then

set imgFormat to “.jpg”

else

set imgFormat to “.png”

end if

end tell

set rawData to (get raw data of artwork 1 of current track)

else

return

end if

on error

display dialog “Problem getting track info.” buttons {”OK”}

return

end try

end tell

try

set baseLoc to choose folder

on error

return

end try

set newPath to ((baseLoc as text) & alb & imgFormat) as text

try

tell me to set fileRef to (open for access newPath with write permission)

write rawData to fileRef starting at 0

tell me to close access fileRef

on error m number n

log n

log m

try

tell me to close access fileRef

end try

end try

Open that in Script Editor and “Save…” it as “Save Current Track’s Artwork” (or whatever) in your ~/Library/iTunes/Scripts/ folder. Whenever a track is playing, you can launch it to choose a folder in which to save the current track’s artwork. Great way to fill up your desktop with effluvia. (I’m kidding. But it would be good for that.)

October 3 '14 - 6:01 am
UPDATED: Save Album Art to Album Folder v5.0

Save Album Art to Album Folder v5.0 will export the artwork of the selected tracks (or the tracks in a selected playlist) as an image file to the folder which contains each selected track’s file—presumably the track’s Album folder—or a single user-selected folder.

Version 5.0 adds support for OS X 10.10 Yosemite and iTunes 12 (dropping support for pre-10.8), adds “Replace existing image file” toggle, adds “Check for Update” menu command, and has some minor maintenance tweaks.

More information and download is here.

October 3 '14 - 6:01 am
UPDATED: Save Album Art as folder.jpg v3.0

Save Album Art as folder.jpg v3.0 will export the artwork of the selected tracks or tracks in the selected playlist as a JPEG image file named folder.jpg to the folder which contains each selected track’s file–presumably the track’s Album folder. Many third-party music players and systems (Sonos, for example) may look for a “folder.jpg” here to use as display artwork.

Version 5.0 adds support for OS X 10.10 Yosemite and iTunes 12 (dropping support for pre-10.8), adds “Check for Update” menu command, and has some minor maintenance tweaks.

More information and download is here.

October 28 '13 - 12:39 pm
UPDATED: Save Album Art as folder.jpg v2.5

Save Album Art as folder.jpg will export the artwork of the selected tracks or tracks in the selected playlist as a JPEG image file named folder.jpg to the folder which contains each selected track’s file–presumably the track’s Album folder. Many third-party music players and systems (Sonos, for example) may look for a “folder.jpg” here to use as display artwork.

Very similar to the just updated Save Album Art to Album Folder.

This latest version makes some tweaks for Mavericks compatibility.

More info and download here.

October 28 '13 - 10:32 am
UPDATED: Save Album Art to Album Folder v4.4

Save Album Art to Album Folder is one of the handful of Artwork Managment scripts suffering from a bit of trouble running under Mavericks.

This script will export the artwork of the selected tracks, or the tracks in a selected playlist, as an image file to the folder which contains each selected track’s file—presumably the track’s Album folder—or a specific user-selected folder. If multiple album tracks are selected, the script will make sure only one artwork file per Album is exported.

This latest version fixes the problem with Mavericks and makes some minor maintenance tweaks.

More info and download is here.

October 25 '13 - 1:56 pm
Artwork Scripts and Mavericks

Some of the newer Artwork Management scripts will fail in Mavericks. They each use a routine that dumps artwork to a file which doesn’t work very well under OS X 10.9:

tell me to set fileRef to (open for access pathToNewFile with write permission)

tell application id “com.apple.iTunes” to write (get raw data of artwork 1 of theTrack) to fileRef starting at 0

tell me to close access fileRef

iTunes will give up an error like this: “AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event rdwr/writ from process ‘Save Album Art to Album Folder’ because it is not entitled to send an AppleEvent to this process.”

(Two words I didn’t want to see side-by-side: “AppleEvents” and “sandbox”.)

The fix is to just stuff the raw data into a variable first then write the data to the file from the variable. I’ll be working this fix into all the scripts affected over the next days and weeks.

August 15 '13 - 5:51 am
UPDATED: Restore Artwork from Album Folder v2.3

Restore Artwork from Album Folder will look for a PNG or JPG/JPEG image file in the parent folder of each selected track’s file–presumably its “Album” folder–and apply the data from that image file as artwork for the track.

This latest version fixes a problem identifying image files correctly, which mostly occurred on non-English operating systems.

February 29 '12 - 10:19 am
UPDATED: Save Album Art as folder.jpg v2.2

Save Album Art as folder.jpg v2.2 will export the artwork of the selected tracks or tracks in the selected playlist as a JPEG image file named folder.jpg to the folder which contains each selected track’s file–presumably the track’s Album folder.

Many third-party music players and systems (Sonos, for example) may look for a “folder.jpg” here to use as display artwork.

This latest version is basically a maintenance update and is now a stay-open app that will float above iTunes while running.

February 26 '12 - 1:11 pm
UPDATED: Save Album Art to Album Folder v4.2

Save Album Art to Album Folder v4.2 exports the display artwork (the first artwork of a track) of the selected tracks, or the tracks in a selected playlist, to either the track’s file’s folder (presumably its “Album” folder) or a user-chosen location—that is, all artwork will be exported to a single chosen folder. Various tweaks to the exported image can be made beforehand:

This latest version now floats above iTunes while running and has some minor code finesses.

December 7 '11 - 11:31 am
UPDATED: Restore Artwork from Album Folder v2.1

Restore Artwork from Album Folder v2.1 will look for an image file in the parent folder of each selected track’s file—presumably its “Album” folder—and apply the data from that image file as artwork for the track.

This latest version addresses an issue whereby the script stalls when no image file is found and logs folders without image file to Console.

Site contents © 2001 - 2014 Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc.