itunes artwork from track's Persistent ID
itunes artwork from track's Persistent ID
- Subject: itunes artwork from track's Persistent ID
- From: "Daniel Angermeier" <email@hidden>
- Date: Sat, 19 May 2007 22:36:46 +0200
Hi,
I want to use applescript to fetch song artwork from iTunes. I use the
following script to do so using the database ID.
I use applescript in an application where I read the iTunes library
xml file at startup, so sometimes the database ID is not correct
anymore and I get the wrong artwork. This is why I want to use the
Persistent ID.
this is how I currently do it:
on getArtworkFromTrackWithID(myid)
set myReturn to 0
tell application "iTunes"
try
set fixed indexing to true
set theLibraryName to name of library playlist 1
tell playlist theLibraryName
set these_tracks to (every track whose database ID is equal to myid)
set this_track to first item of these_tracks
if artworks of this_track is {} then
return null
else
return data of artwork 1 of this_track
end if
end tell
end try
end tell
return myReturn
end getArtworkFromTrackWithID
I want to give a persistent ID (looking like this A849A38D374E1F45) of my id.
Any help would be great.
Thanks Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden