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 d9529d04a8
commit 505b8c3140
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;