Fix playlist entry to return 0 length instead of NaN when metadata hasn't loaded yet.
parent
9866c24b9f
commit
f01cfdb4fd
|
@ -287,7 +287,7 @@
|
|||
@dynamic length;
|
||||
- (NSNumber *)length
|
||||
{
|
||||
return [NSNumber numberWithDouble:((double)self.totalFrames / self.sampleRate)];
|
||||
return [NSNumber numberWithDouble:(self.metadataLoaded)?((double)self.totalFrames / self.sampleRate):0.0];
|
||||
}
|
||||
|
||||
@dynamic path;
|
||||
|
|
Loading…
Reference in New Issue