From 9ce92f2ac1d5fd2e4c2d3f24374a4a86cc1ded46 Mon Sep 17 00:00:00 2001 From: matthewleon Date: Fri, 29 Feb 2008 20:30:37 +0000 Subject: [PATCH] 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 --- Playlist/PlaylistEntry.h | 4 ++-- Playlist/PlaylistEntry.m | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Playlist/PlaylistEntry.h b/Playlist/PlaylistEntry.h index 834c45868..e6506ab4c 100644 --- a/Playlist/PlaylistEntry.h +++ b/Playlist/PlaylistEntry.h @@ -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; diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 8789fcff2..230510c73 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -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