Re: get iTunes songs
Re: get iTunes songs
- Subject: Re: get iTunes songs
- From: Mike Abdullah <email@hidden>
- Date: Tue, 17 Oct 2006 09:17:49 +0100
On 16 Oct 2006, at 20:33, John C. Daub wrote:
on 10/16/06 2:00 PM, John Stiles at email@hidden wrote:
Are you certain that the XML is always up to date?
For example, if the user opens up iTunes and adds a song, the XML
might not reflect that song immediately.
I believe AppleScript is still the way to go; you just need to
minimize the number of transactions. There's no need to do a separate
transaction for each property of each song; that's going to produce
bad results.
As well, the XML library is technically a private format, subject
to change
without notice and breakage for your app without notice. It is my
understanding that the AppleScript API for iTunes is the best way
to go in
terms of getting what you want in a way that ought to be compatible
and work
well into the future.
This is true. However, on my PowerBook G4, it does take approx. 30
seconds with iTunes 7 to run Matt's suggested script. That's 30
seconds where the app is completely unresponsive. It's not easy to
do this applescript in a secondary thread.
Reading the dictionary on the other hand is very easy to do.
Mike.
I would agree... the best thing to try is some custom code that
fetches the
data in bulk, instead of multiple little transactions. Try different
approaches to find what works best... different "groupings" of your
batch
information getting. Experiment to find the best batching for your
needs.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/>
"We will make everything metal; blacker than the blackest black...
times
infinity!" - Nathan Explosion
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden