From d9fe900952db446ded5ebdb937bd9e242b4a96de Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Sun, 31 Mar 2024 22:48:56 +0200 Subject: [PATCH] Fix FindExtras overwriting current extra type (#11260) --- Emby.Server.Implementations/Library/LibraryManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index a2abafd2a..0c854bdb7 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2677,7 +2677,12 @@ namespace Emby.Server.Implementations.Library extra = itemById; } - extra.ExtraType = extraType; + // Only update extra type if it is more specific then the currently known extra type + if (extra.ExtraType is null or ExtraType.Unknown || extraType != ExtraType.Unknown) + { + extra.ExtraType = extraType; + } + extra.ParentId = Guid.Empty; extra.OwnerId = owner.Id; return extra;