aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/ResolverHelper.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2022-12-03 12:44:45 +0100
committerShadowghost <Ghost_of_Stone@web.de>2022-12-03 12:44:45 +0100
commitbcd992fb0604839c18a628850df095777d6cf6f9 (patch)
treeabd5da0cd5ff6a7043f00969b912a00067f344f7 /Emby.Server.Implementations/Library/ResolverHelper.cs
parent36994c17bf5f71f37a5002a51840306fa09fb0ef (diff)
parentdb2c0d4c91a952407ab7709d9ff5c86017e5753e (diff)
Merge remote-tracking branch 'upstream/master' into network-rewrite
Diffstat (limited to 'Emby.Server.Implementations/Library/ResolverHelper.cs')
-rw-r--r--Emby.Server.Implementations/Library/ResolverHelper.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/ResolverHelper.cs b/Emby.Server.Implementations/Library/ResolverHelper.cs
index ac75e5d3a..4100a74a5 100644
--- a/Emby.Server.Implementations/Library/ResolverHelper.cs
+++ b/Emby.Server.Implementations/Library/ResolverHelper.cs
@@ -20,8 +20,9 @@ namespace Emby.Server.Implementations.Library
/// <param name="parent">The parent.</param>
/// <param name="libraryManager">The library manager.</param>
/// <param name="directoryService">The directory service.</param>
+ /// <returns>True if initializing was successful.</returns>
/// <exception cref="ArgumentException">Item must have a path.</exception>
- public static void SetInitialItemValues(BaseItem item, Folder? parent, ILibraryManager libraryManager, IDirectoryService directoryService)
+ public static bool SetInitialItemValues(BaseItem item, Folder? parent, ILibraryManager libraryManager, IDirectoryService directoryService)
{
// This version of the below method has no ItemResolveArgs, so we have to require the path already being set
if (string.IsNullOrEmpty(item.Path))
@@ -44,12 +45,14 @@ namespace Emby.Server.Implementations.Library
var fileInfo = directoryService.GetFile(item.Path);
if (fileInfo == null)
{
- throw new FileNotFoundException("Can't find item path.", item.Path);
+ return false;
}
SetDateCreated(item, fileInfo);
EnsureName(item, fileInfo);
+
+ return true;
}
/// <summary>