The Free Software Media System - Server Backend & API
Ensure parts use base type
Shadowghostf5b2e0b8f93f
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.csindex 67fca232dc..58dd3b8745 100644--- a/MediaBrowser.Controller/Entities/Video.cs+++ b/MediaBrowser.Controller/Entities/Video.cs@@ -537,6 +537,17 @@ namespace MediaBrowser.Controller.Entitiesreturn;}+ // 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);