Metadata: Fix length field on track reloading

This fixes the dynamic length field not updating correctly after a track
info reload, which breaks the seekbar when reloading the current track.

Fixes #227

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-07 03:03:39 -08:00
parent b2177fccbc
commit 6120fce40a
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@
} }
+ (NSSet *)keyPathsForValuesAffectingLength { + (NSSet *)keyPathsForValuesAffectingLength {
return [NSSet setWithObject:@"totalFrames"]; return [NSSet setWithObjects:@"metadataLoaded", @"totalFrames", @"sampleRate", nil];
} }
+ (NSSet *)keyPathsForValuesAffectingPath { + (NSSet *)keyPathsForValuesAffectingPath {
@ -443,7 +443,7 @@
[self setValuesForKeysWithDictionary:metadata]; [self setValuesForKeysWithDictionary:metadata];
} }
metadataLoaded = YES; [self setMetadataLoaded:YES];
} }
- (id)copyWithZone:(NSZone *)zone { - (id)copyWithZone:(NSZone *)zone {