mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 21:08:27 +01:00
More improvements
This commit is contained in:
@@ -14,14 +14,14 @@ namespace MediaBrowser.Controller.Library
|
||||
/// These are arguments relating to the file system that are collected once and then referred to
|
||||
/// whenever needed. Primarily for entity resolution.
|
||||
/// </summary>
|
||||
public class ItemResolveArgs : EventArgs
|
||||
public class ItemResolveArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The _app paths.
|
||||
/// </summary>
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
|
||||
public IDirectoryService DirectoryService { get; private set; }
|
||||
private LibraryOptions _libraryOptions;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ItemResolveArgs" /> class.
|
||||
@@ -34,17 +34,18 @@ namespace MediaBrowser.Controller.Library
|
||||
DirectoryService = directoryService;
|
||||
}
|
||||
|
||||
public IDirectoryService DirectoryService { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file system children.
|
||||
/// </summary>
|
||||
/// <value>The file system children.</value>
|
||||
public FileSystemMetadata[] FileSystemChildren { get; set; }
|
||||
|
||||
public LibraryOptions LibraryOptions { get; set; }
|
||||
|
||||
public LibraryOptions GetLibraryOptions()
|
||||
public LibraryOptions LibraryOptions
|
||||
{
|
||||
return LibraryOptions ?? (LibraryOptions = Parent == null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent));
|
||||
get => _libraryOptions ??= Parent == null ? new LibraryOptions() : BaseItem.LibraryManager.GetLibraryOptions(Parent);
|
||||
set => _libraryOptions = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -139,7 +140,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// Adds the additional location.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="path"/> is <c>null</c> or empty.</exception>
|
||||
public void AddAdditionalLocation(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
@@ -148,7 +149,6 @@ namespace MediaBrowser.Controller.Library
|
||||
}
|
||||
|
||||
AdditionalLocations ??= new List<string>();
|
||||
|
||||
AdditionalLocations.Add(path);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>FileSystemInfo.</returns>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <c>null</c> or empty.</exception>
|
||||
public FileSystemMetadata GetFileSystemEntryByName(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
|
||||
Reference in New Issue
Block a user