From 6120fce40a8caa677fa504463444285b23cc2d4c Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 7 Feb 2022 03:03:39 -0800 Subject: [PATCH] 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 --- Playlist/PlaylistEntry.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 08989f3b6..0685168ab 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -73,7 +73,7 @@ } + (NSSet *)keyPathsForValuesAffectingLength { - return [NSSet setWithObject:@"totalFrames"]; + return [NSSet setWithObjects:@"metadataLoaded", @"totalFrames", @"sampleRate", nil]; } + (NSSet *)keyPathsForValuesAffectingPath { @@ -443,7 +443,7 @@ [self setValuesForKeysWithDictionary:metadata]; } - metadataLoaded = YES; + [self setMetadataLoaded:YES]; } - (id)copyWithZone:(NSZone *)zone {