• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
itunes artwork from track's Persistent ID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Filemaker 8.5 stored applescript problem
  • Next by Date: Re: Filemaker 8.5 stored applescript problem
  • Previous by thread: Re: Converting Word files to PDF
  • Next by thread: Which drive is a CD in?
  • Index(es):
    • Date
    • Thread