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