Re: get iTunes songs
Re: get iTunes songs
- Subject: Re: get iTunes songs
- From: Olariu Adrian Mihai <email@hidden>
- Date: Mon, 16 Oct 2006 17:16:26 +0300
If I have about 5000 tracks in the library mand it takes about 20
seconds to load all the track in my table view. Below is the code that I
use to load tracks.
while (track = [trackEnum nextObject])
{
id obj=[trackArray objectAtIndex:count];
count++;
if ([track databaseId] == [currentTrack databaseId])
{
currentTrackObject = obj;
[obj setValue:[playIcon image] forKey:@"Status"];
}
NSString *artist = [track artist];
[obj setValue:track forKey:@"Track"];
[obj setValue:[track name] forKey:@"Name"];
[obj setValue:[track time] forKey:@"Time"];
[obj setValue:artist forKey:@"Artist"];
[obj setValue:[track album] forKey:@"Album"];
[obj setValue:[[NSNumber alloc] initWithInt:[track rating]/20 ]
forKey:@"MyRating"];
if (![artist isEqualToString:@""])
if (![artistArray containsObject:artist])
[artistArray addObject:artist];
}
John Stiles wrote:
I think Automator will be doing the same basic thing as EyeTunes—using
AppleEvents to get a list of all available songs.
Could you post the EyeTunes code that was too slow for you?
How slow was too slow?
Olariu Adrian Mihai wrote:
I want to create an application that get all the songs from itunes
library and display them in a tableview.
I have tried EyeTunes framework but is to slow for what I am trying
to do. I see that from an "Automator" application it is possible to
get all the tracks from itunes library but how can I include this
functionality in my application?
Thanks.
_______________________________________________
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