Changeset 5489
- Timestamp:
- 05/02/08 14:58:22 (2 weeks ago)
- Files:
-
- Spiral/trunk/SPPlaylistLoader.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Spiral/trunk/SPPlaylistLoader.m
r5483 r5489 92 92 93 93 - (void)_loadMetadata:(SPPlaylistContainer *)container { 94 NSArray *items; 95 QTMovie *movie; 96 SPPlaylistFile *file; 97 id item; 94 NSArray *items; 95 NSDictionary *attributes; 96 NSString *path; 97 QTMovie *movie; 98 SPPlaylistFile *file; 99 id item; 98 100 99 101 items = [[[container items] copy] autorelease]; … … 104 106 105 107 if([file duration] == 0.0 || [file sizeOnDisk] != [file size]) { 106 movie = [[QTMovie alloc] initWithFile:[file resolvedPath] error:NULL];108 path = [file resolvedPath]; 107 109 108 if(movie) { 109 [self performSelectorOnMainThread:@selector(_loadedMetadataOfFile:movie:) 110 withObject:file 111 withObject:movie 112 waitUntilDone:YES]; 113 114 [movie release]; 110 if(![[[path pathExtension] lowercaseString] isEqualToString:@"wmv"]) { 111 attributes = [NSDictionary dictionaryWithObjectsAndKeys: 112 path, QTMovieFileNameAttribute, 113 [NSNumber numberWithBool:NO], QTMovieDontInteractWithUserAttribute, 114 NULL]; 115 movie = [[QTMovie alloc] initWithAttributes:attributes error:NULL]; 116 117 if(movie) { 118 [self performSelectorOnMainThread:@selector(_loadedMetadataOfFile:movie:) 119 withObject:file 120 withObject:movie 121 waitUntilDone:YES]; 122 123 [movie release]; 124 } 115 125 } 116 126 }
