Fixed compiler warnings by converting PlaylistEntry length property to NSNumber.
parent
e073f48dd5
commit
5346d85099
|
@ -102,8 +102,8 @@
|
|||
ldiv_t hoursAndMinutes;
|
||||
|
||||
for (PlaylistEntry *pe in [self arrangedObjects]) {
|
||||
if (!isnan(pe.length))
|
||||
tt += pe.length;
|
||||
if (!isnan([pe.length doubleValue]))
|
||||
tt += [pe.length doubleValue];
|
||||
}
|
||||
|
||||
int sec = (int)(tt);
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef enum {
|
|||
- (void)readPropertiesThread;
|
||||
|
||||
@property(readonly) NSString *display;
|
||||
@property(readonly) double length;
|
||||
@property(retain, readonly) NSNumber *length;
|
||||
@property(readonly) NSString *path;
|
||||
@property(readonly) NSString *filename;
|
||||
|
||||
|
|
|
@ -105,16 +105,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (double)length
|
||||
@dynamic length;
|
||||
- (NSNumber *)length
|
||||
{
|
||||
return ((double)self.totalFrames / self.sampleRate);
|
||||
return [NSNumber numberWithDouble:((double)self.totalFrames / self.sampleRate)];
|
||||
}
|
||||
|
||||
@dynamic path;
|
||||
- (NSString *)path
|
||||
{
|
||||
return [[self.URL path] stringByAbbreviatingWithTildeInPath];
|
||||
}
|
||||
|
||||
@dynamic filename;
|
||||
- (NSString *)filename
|
||||
{
|
||||
return [[self.URL path] lastPathComponent];
|
||||
|
|
|
@ -16,7 +16,5 @@
|
|||
|
||||
+ (SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem;
|
||||
|
||||
// New length getters/setters
|
||||
|
||||
@property(retain) NSNumber *length;
|
||||
@property(retain, readwrite) NSNumber *length;
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue