From 71594b4a9a1fa91fbb03e6e8f79090465619bd9c Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sun, 8 Feb 2026 17:22:52 +0100 Subject: Fix multiple version resolution --- MediaBrowser.Controller/Library/ILibraryManager.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'MediaBrowser.Controller/Library') diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 453d9f7c2b..e73dede1d4 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -67,6 +67,22 @@ namespace MediaBrowser.Controller.Library IDirectoryService? directoryService = null, CollectionType? collectionType = null); + /// + /// Resolves a video file as an alternate version of a primary video, ensuring the result + /// has the same concrete type as the primary (e.g. Movie instead of generic Video). + /// Also cleans up any existing item with the wrong type from a previous scan. + /// + /// The file path of the alternate version. + /// The expected concrete type (same as the primary video). + /// The parent folder. + /// The collection type of the library. + /// A correctly-typed Video, or null if resolution fails. + Video? ResolveAlternateVersion( + string path, + Type expectedVideoType, + Folder? parent, + CollectionType? collectionType); + /// /// Resolves a set of files into a list of BaseItem. /// -- cgit v1.2.3