From 4bcabbde7b8c1a9a0ca7a89ab3e2b0de390393f5 Mon Sep 17 00:00:00 2001 From: scampower3 <81431263+scampower3@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:39:30 +0800 Subject: [PATCH] Fixes 'replace missing metadata' overwrites existing metadata that does exist (#11136) --- MediaBrowser.Providers/Manager/MetadataService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 06445c90d9..6f473fc07a 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -773,7 +773,8 @@ namespace MediaBrowser.Providers.Manager MergeData(metadata, temp, Array.Empty(), false, false); } - MergeData(temp, metadata, item.LockedFields, true, false); + // Will always replace all metadata when Scan for new and updated files is used. Else, follow the options. + MergeData(temp, metadata, item.LockedFields, options.MetadataRefreshMode == MetadataRefreshMode.Default || options.ReplaceAllMetadata, false); } } }