Re: Song dragged from iTunes
Re: Song dragged from iTunes
- Subject: Re: Song dragged from iTunes
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 08 May 2003 13:57:57 +0200
You can directly do
dict = [[NSMutableDictionary dictionaryWithContentsOfFile:file];
The result is the same ;-)
>
NSString *musikkString = [NSString
>
stringWithContentsOfFile:musikkPath];
>
NSMutableDictionary *dict = [musikkString propertyList];
There is many type of data in the pastboard when you drag iTunes songs. You
can probally find what they contain with some NSLog and with debugger.
>
Message: 1
>
Date: Thu, 8 May 2003 07:49:21 +0200
>
Subject: Re: Song dragged from iTunes
>
Cc: email@hidden
>
To: Calvin Chen <email@hidden>
>
From: Ivan Myrvold <email@hidden>
>
>
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:
_______________________________________________
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.