From f5b2e0b8f93f6e6ccfd4753caf27b390d6010065 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Thu, 5 Mar 2026 21:38:10 +0100 Subject: [PATCH] Ensure parts use base type --- MediaBrowser.Controller/Entities/Video.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 67fca232dc..58dd3b8745 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -537,6 +537,17 @@ namespace MediaBrowser.Controller.Entities return; } + // Ensure parts use the expected base type (e.g. Video, not Movie) + if (video.GetType() != itemType && Activator.CreateInstance(itemType) is Video correctVideo) + { + correctVideo.Path = video.Path; + correctVideo.Name = video.Name; + correctVideo.VideoType = video.VideoType; + correctVideo.ProductionYear = video.ProductionYear; + correctVideo.ExtraType = video.ExtraType; + video = correctVideo; + } + video.Id = id; video.OwnerId = Id; LibraryManager.CreateItem(video, parentFolder);