Re: How to get music list?
Re: How to get music list?
- Subject: Re: How to get music list?
- From: "Dave DeLong" <email@hidden>
- Date: Sun, 3 Aug 2008 22:06:21 -0600
And having experimented with this myself, AppleScript can be
horrendously slow if you need to get information on more than about 50
tracks.
I personally don't have much experience with SB, so I would recommend
parsing the xml file. Even if it is unsupported, the xml file format
has stayed very consistent over the years and has only changed as new
features are added to iTunes (and even those basically just append
info the file and don't really alter the structure too much).
Parsing the xml is also very very very fast. You can parse thousands
of seconds in only a couple seconds.
Dave DeLong
On Sun, Aug 3, 2008 at 7:31 PM, Kyle Sluder
<email@hidden> wrote:
> On Sun, Aug 3, 2008 at 8:41 PM, Eric Lee <email@hidden> wrote:
>> The problem, is actually getting started. Which class should I use?
>
> Break it down. By far the more challenging part is actually getting
> the iTunes data. There are a few ways of going about this:
>
> 1) Use Scripting Bridge (Leopard only).
> 2) Build an AppleScript and send it to iTunes.
> 3) Send raw Apple Events to iTunes.
> 4) Parse the iTunes Library XML files.
>
> #4 is unsupported, but also the only way to get access to the iTunes
> library when iTunes isn't running. The approach you take is dictated
> by your functional requirements.
>
> HTH,
> --Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden