aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2024-02-28 17:18:52 -0700
committerGitHub <noreply@github.com>2024-02-28 17:18:52 -0700
commit5a652360c316173e8e03bb36cd58aeb50edbbc45 (patch)
tree634008e92c089c0da7b602df5bbeabfa3a83000c
parentddf8f7d636c49d24f35d24d4b73889bd57fca689 (diff)
Update AudioFileProber.cs
-rw-r--r--MediaBrowser.Providers/MediaInfo/AudioFileProber.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
index f200e15d0..64acca1e3 100644
--- a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
+++ b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
@@ -320,8 +320,26 @@ namespace MediaBrowser.Providers.MediaInfo
}
_libraryManager.UpdatePeople(audio, people);
- audio.Artists ??= performers;
- audio.AlbumArtists ??= albumArtists;
+
+ if (options.ReplaceAllMetadata && performers.Length != 0)
+ {
+ audio.Artists = performers;
+ }
+ else if (!options.ReplaceAllMetadata
+ && (audio.Artists is null || audio.Artists.Count == 0))
+ {
+ audio.Artists = performers;
+ }
+
+ if (options.ReplaceAllMetadata && albumArtists.Length != 0)
+ {
+ audio.AlbumArtists = albumArtists;
+ }
+ else if (!options.ReplaceAllMetadata
+ && (audio.AlbumArtists is null || audio.AlbumArtists.Count == 0))
+ {
+ audio.AlbumArtists = albumArtists;
+ }
}
if (!audio.LockedFields.Contains(MetadataField.Name))