• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Song dragged from iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Song dragged from iTunes
      • From: Robert Fischer <email@hidden>
  • Prev by Date: Re: Loosing threads in cocoa
  • Next by Date: Re: Initial Window position
  • Previous by thread: Re: Message dragged from Mail.app
  • Next by thread: Re: Song dragged from iTunes
  • Index(es):
    • Date
    • Thread