Fixed issues with big big playlists.

CQTexperiment
vspader 2008-03-04 00:35:20 +00:00
parent 69e802052e
commit 16ccf5622d
1 changed files with 5 additions and 4 deletions

View File

@ -272,14 +272,14 @@
- (void)loadInfoForEntries:(NSArray *)entries - (void)loadInfoForEntries:(NSArray *)entries
{ {
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];
NSOperationQueue *queue; NSOperationQueue *queue;
queue = [[[NSApplication sharedApplication] delegate] sharedOperationQueue]; queue = [[[NSApplication sharedApplication] delegate] sharedOperationQueue];
NSInvocationOperation *oldReadEntryInfoOperation = Nil; NSInvocationOperation *oldReadEntryInfoOperation = nil;
for (PlaylistEntry *pe in entries) for (PlaylistEntry *pe in entries)
{ {
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];
NSInvocationOperation *readEntryInfoOperation; NSInvocationOperation *readEntryInfoOperation;
readEntryInfoOperation = [[NSInvocationOperation alloc] readEntryInfoOperation = [[NSInvocationOperation alloc]
initWithTarget:self initWithTarget:self
@ -297,13 +297,14 @@
[queue addOperation:readEntryInfoOperation]; [queue addOperation:readEntryInfoOperation];
oldReadEntryInfoOperation = [readEntryInfoOperation retain]; oldReadEntryInfoOperation = [readEntryInfoOperation retain];
[readEntryInfoOperation release]; [readEntryInfoOperation release];
[pool release];
} }
[oldReadEntryInfoOperation release]; [oldReadEntryInfoOperation release];
[queue waitUntilAllOperationsAreFinished]; [queue waitUntilAllOperationsAreFinished];
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO]; [playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
[pool release];
} }
- (NSDictionary *)readEntryInfo:(PlaylistEntry *)pe - (NSDictionary *)readEntryInfo:(PlaylistEntry *)pe