aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/ResolverHelper.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2022-10-12 22:47:41 +0200
committerGitHub <noreply@github.com>2022-10-12 22:47:41 +0200
commit263a1663aebd26bd57bfc10c50ecbb76c8195291 (patch)
tree16f85f80d12aa59b175ede5b7ed6ab8f26ba1c9b /Emby.Server.Implementations/Library/ResolverHelper.cs
parent99e31846bf38c066fa6817f289757b9202a56e04 (diff)
parentc38052a7537098d658221a8f20ccffc75e3c0055 (diff)
Merge pull request #8521 from 1337joe/fix-missing-symlink-scan
Skip missing symlink instead of breaking out of directory scan
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>