diff options
| author | Negulici-R. Barnabas <109497789+negulici-r-barnabas@users.noreply.github.com> | 2022-11-13 15:29:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-13 15:29:16 +0200 |
| commit | b7aa5ed862db11bbbc0a4ea5c92a67b772bfc35d (patch) | |
| tree | d8f396f581f3bdbd4be4c34d4a949df9fff72934 /Emby.Server.Implementations/Library/ResolverHelper.cs | |
| parent | 1e41636e30b82518633ac6979564ff98bb40aca9 (diff) | |
| parent | 6655cf4e58285f51b612efb0bb6229f036da2591 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'Emby.Server.Implementations/Library/ResolverHelper.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/ResolverHelper.cs | 7 |
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> |
