Fix playlist entry to return 0 length instead of NaN when metadata hasn't loaded yet.

CQTexperiment
Christopher Snowhill 2018-09-22 03:11:13 -07:00
parent 9866c24b9f
commit f01cfdb4fd
1 changed files with 1 additions and 1 deletions

View File

@ -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;