Re: Song dragged from iTunes
Re: Song dragged from iTunes
- Subject: Re: Song dragged from iTunes
- From: Ivan Myrvold <email@hidden>
- Date: Thu, 8 May 2003 07:49:21 +0200
Yes, you can read in the "iTunes Music Library.xml" just fine. Just
think of it as a plist file. I have this code in my iTunes remote
controlling application:
NSString *musikkString = [NSString
stringWithContentsOfFile:musikkPath];
NSMutableDictionary *dict = [musikkString propertyList];
NSArray *thisPlaylist = [musikkDict objectForKey:@"Playlists"];
musikkPath is the file path to the xml file. Now you can drill down the
playlist to get the information you need. To get the information about
the tracks, use objectForKey:@:"Tracks".
Ivan
Pe torsdag, 8. mai 2003, kl. 03:50, skrev Calvin Chen:
>
Hi,
>
>
How can I know more information when I got a dropped song(s) from
>
iTunes? I
>
accept NSFilesPromisedPboardType in my NSView so I can only get song
>
name
>
(i.e. Michael.mp3) but nothing else.
>
>
The more info I want to know are:
>
1. Title of song
>
2. Artist of song
>
3. Full path to the song in iTunes folder
>
4. How to verify the dropped item is from iTunes
>
>
>
I know iTunes exposes a database XML file in ~/Music/iTunes/iTune Music
>
Library.xml, and there are "iTunes 3 Music Library" or "iTunes 4 Music
>
Library" iTunes database files in the same folder but all are not
>
readable
>
(need data structure to explore it). Is Apple publics the data
>
structure of
>
the database file?
>
>
>
>
Best regards,
>
Calvin
>
_______________________________________________
>
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.
>
>
Ivan C Myrvold
OrtopediService AS
Mob. 913 16 356
Tlf. 38 14 45 93
_______________________________________________
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.