Playlistentry code cleanup. Also converted track to NSNumber to fix Spotlight hang from forum discussed here: http://www.cogx.org/forums/viewtopic.php?id=332

CQTexperiment
matthewleon 2008-02-29 20:30:37 +00:00
parent 5346d85099
commit 9ce92f2ac1
2 changed files with 9 additions and 9 deletions

View File

@ -31,7 +31,7 @@ typedef enum {
NSString *title;
NSString *genre;
NSString *year;
int track;
NSNumber *track;
long long totalFrames;
int bitrate;
@ -64,7 +64,7 @@ typedef enum {
@property(retain) NSString *title;
@property(retain) NSString *genre;
@property(retain) NSString *year;
@property int track;
@property(retain) NSNumber *track;
@property long long totalFrames;
@property int bitrate;

View File

@ -70,17 +70,17 @@
NSString *ti = [m objectForKey:@"title"];
if (ti == nil || [ti isEqualToString:@""]) {
[self setTitle:[[self.URL path] lastPathComponent]];
self.title = [[self.URL path] lastPathComponent];
}
else {
[self setTitle:ti];
self.title = ti;
}
[self setArtist:[m objectForKey:@"artist" ]];
[self setAlbum: [m objectForKey:@"album" ]];
[self setGenre: [m objectForKey:@"genre" ]];
[self setYear: [m objectForKey:@"year" ]];
[self setTrack: [[m objectForKey:@"track" ] intValue]];
self.artist = [m objectForKey:@"artist"];
self.album = [m objectForKey:@"album"];
self.genre = [m objectForKey:@"genre"];
self.year = [m objectForKey:@"year"];
self.track = [m objectForKey:@"track"];
}
- (void)readMetadataThread