From 0cf8b376acb9bb59be93865c566735df39490d0d Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Sun, 24 Mar 2024 01:11:45 +0100 Subject: Don't expect `BaseItem` to be a movie/video file. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fix is mainly so I can mass-add series _and_ movie entries using a `IMultiItemResolver` without having to resort to complicated logic using _both_ a `IItemResolver` and a `IMultiItemResolver` by splitting up what gets added where. I've also added three new interface methods to the `IDirectoryService`, one of which is used in the modified `ResolverHelper.SetInitialItemValues(…)` to get the file system entry info for the item regardless of which type the file system entry is. In my local testing so far I haven't found any issues introduced by this change. --- Emby.Server.Implementations/Library/ResolverHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Library/ResolverHelper.cs') diff --git a/Emby.Server.Implementations/Library/ResolverHelper.cs b/Emby.Server.Implementations/Library/ResolverHelper.cs index 52be76217..c9e3a4daf 100644 --- a/Emby.Server.Implementations/Library/ResolverHelper.cs +++ b/Emby.Server.Implementations/Library/ResolverHelper.cs @@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Library item.GetParents().Any(i => i.IsLocked); // Make sure DateCreated and DateModified have values - var fileInfo = directoryService.GetFile(item.Path); + var fileInfo = directoryService.GetFileSystemEntry(item.Path); if (fileInfo is null) { return false; -- cgit v1.2.3