aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-03-05 21:38:10 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-03-05 21:38:10 +0100
commitf5b2e0b8f93f6e6ccfd4753caf27b390d6010065 (patch)
treec521501931813564feefb8cc3a462c9043c81ac2
parent59c360aea7d5e2e07118d5ab1ebe6cdd8b3dd0f1 (diff)
Ensure parts use base type
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs11
1 files changed, 11 insertions, 0 deletions
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);