Re: iTunes Playlist Icons
Re: iTunes Playlist Icons
- Subject: Re: iTunes Playlist Icons
- From: Dave DeLong <email@hidden>
- Date: Sat, 09 Apr 2005 20:11:00 -0600
I've done something similar to this in another language, and here's
the gist of how I did it:
(I'm going to assume you're loading the iTunes Music Library.xml into
an NSDictionary, because that would be the smart thing to do)
You can loop through the playlists in the dictionary, and check if
each one contains a key of either "<key>Smart Info</key>" or
"<key>Smart Criteria</key>". If the playlist has either of those
keys, you can assume it's a Smart Playlist. If it doesn't, then you
check to see if the name is either "Library" (give it the Library
icon), "Party Shuffle" (give it the P.S. icon), or "Purchased
Music" (give it the green playlist icon). If it's not a smart
playlist and doesn't have any of those names, you can safely assume
that's it's just a standard drag-and-drop playlist.
I have a large .tiff file that has all of the standard iTunes
playlist and device icons at full 128x128 size, so if you want them,
I can email it privately.
HTH!
Dave DeLong
On Apr 9, 2005, at 3:39 PM, Jerry Brace wrote:
I'm populating a NSPopUpButton with a list of playlists from the
iTunes Library XML - finally figured it out :)
I was just wondering if anyone else here has done this - and if so
- how did you go about displaying the correct icon for each play
list. I know how to attach an image - but figuring out which one
based on the playlist type is the question.
For example there are these types: Library, Party Shuffled,
Playlist, Smart Playlist and Smart Playlist.
Would this have to be hard coded in some way? I was just wondering
what the best way to go about it would be.
Jerry Brace
Web and Multimedia Developer
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden