Exporting Cover - DVDPedia - AppleScript

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
Franco
Bruji Friend
Bruji Friend
Posts: 13
Joined: Sun Dec 19, 2010 2:36 am

Exporting Cover - DVDPedia - AppleScript

Post by Franco »

I have a new AppleTV, and added my movies to iTunes. I trying to learn AppleScript to move information from DVDPedia to iTunes
From the filename in iTunes, I found the CollectionID that is created in DVDPedia.
I have created a template in DVDPedia to export some tag, including CollectionID, then paste the exported text to a Numbers's sheet.
From the CollectionID, I am able to get my rating, genre, theatrical etc from DVDPedia move to iTunes by a simple script
BUT
now I am trying to set the Cover in iTunes with AppleScripts but I can seems to find how to do it.

Any Suggestion ?

Thank You
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Exporting Cover - DVDPedia - AppleScript

Post by Conor »

On DVDpedia you can get the cover via the [key:uid]. You would prefix the path to the covers folder (by default ~/Library/Application Support/DVDpedia/Covers/) and suffix the .jpg ending. To set the image in iTunes via AppleScript I am not sure what the correct code would be. But this code is what we use to get the image, so it might give you some clues:

Code: Select all

if (class of theTrack is file track and artworks of theTrack is not {}) then
set artworkData to (data of artwork 1 of theTrack) as picture
set artworkFormat to (format of artwork 1 of theTrack) as string
return {artworkData, artworkFormat}
However, Doug's AppleScripts are an excellent resource for anything iTunes AppleScript related, so you will most likely have a lot of luck checking there.

If you haven't already take a look at Para9's plug-in for AppleTV and DVDpedia might be of interest.
Post Reply