Re: Get the latest song pathname played by iTunes
Re: Get the latest song pathname played by iTunes
- Subject: Re: Get the latest song pathname played by iTunes
- From: Mario Diana <email@hidden>
- Date: Sun, 18 Jul 2004 14:43:09 -0400
On Sunday, July 18, 2004, at 12:05 PM, Finlay Dobbie
<email@hidden> wrote:
Uh, it's a property list.
NSDictionary *dict = [NSDictionary
dictionaryWithContentsOfFile:[@"~/Music/iTunes/iTunes Music
Library.xml" stringByExpandingTildeInPath]];
I don't see how it could possibly be any easier to parse.
Uh, I just prototyped the whole thing, going as far as getting the
track ID of every song in which I'm interested. It will take a while
for the dent in my head -- gotten from banging it against the side of
my desk -- to work its way out.
As to my parsing the XML in Java: I guess its one of those "If you have
a hammer, everything looks like a nail" things. I guess I shouldn't
have been seduced by Apple's attempt at being sexy by appending ".xml"
on the end of what's essentially a plist file.
As much as it hurts to see how easily I could have accomplished what I
did, I have to thank you ;-)
Mario
=======================================================
Mario Diana Mobile: 845-380-8428
50 Forest Drive Home: 845-221-3989
Poughquag, NY 12570 Email: email@hidden
=======================================================
Programmer - Web development, Java, XML, LAMP, Mac OS X
=======================================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.