From 29dfe593f142c0cbe63b97760a0cf4e42150abc7 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 13 Jul 2022 00:12:35 -0700 Subject: [PATCH] [Ogg Vorbis/Opus] Fix tag clobber on play Fixed the tags being overwritten by an "update" on non-streaming files. Signed-off-by: Christopher Snowhill --- Plugins/Opus/Opus/OpusDecoder.m | 6 ++++-- Plugins/Vorbis/VorbisDecoder.m | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Plugins/Opus/Opus/OpusDecoder.m b/Plugins/Opus/Opus/OpusDecoder.m index 615dfab18..ea83f38e0 100644 --- a/Plugins/Opus/Opus/OpusDecoder.m +++ b/Plugins/Opus/Opus/OpusDecoder.m @@ -180,8 +180,10 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va metaDict = _metaDict; albumArt = _albumArt; - [self willChangeValueForKey:@"metadata"]; - [self didChangeValueForKey:@"metadata"]; + if(![source seekable]) { + [self willChangeValueForKey:@"metadata"]; + [self didChangeValueForKey:@"metadata"]; + } } } } diff --git a/Plugins/Vorbis/VorbisDecoder.m b/Plugins/Vorbis/VorbisDecoder.m index 6b46c3da4..c73c53e31 100644 --- a/Plugins/Vorbis/VorbisDecoder.m +++ b/Plugins/Vorbis/VorbisDecoder.m @@ -157,8 +157,10 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va metaDict = _metaDict; albumArt = _albumArt; - [self willChangeValueForKey:@"metadata"]; - [self didChangeValueForKey:@"metadata"]; + if(![source seekable]) { + [self willChangeValueForKey:@"metadata"]; + [self didChangeValueForKey:@"metadata"]; + } } } }