|
@@ -1,5 +1,4 @@
|
|
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Controller.Entities;
|
|
-using MediaBrowser.Controller.IO;
|
|
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.IO;
|
|
@@ -17,14 +16,17 @@ namespace MediaBrowser.Controller.Library
|
|
/// The _app paths
|
|
/// The _app paths
|
|
/// </summary>
|
|
/// </summary>
|
|
private readonly IServerApplicationPaths _appPaths;
|
|
private readonly IServerApplicationPaths _appPaths;
|
|
|
|
+ private readonly ILibraryManager _libraryManager;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ItemResolveArgs" /> class.
|
|
/// Initializes a new instance of the <see cref="ItemResolveArgs" /> class.
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="appPaths">The app paths.</param>
|
|
/// <param name="appPaths">The app paths.</param>
|
|
- public ItemResolveArgs(IServerApplicationPaths appPaths)
|
|
|
|
|
|
+ /// <param name="libraryManager">The library manager.</param>
|
|
|
|
+ public ItemResolveArgs(IServerApplicationPaths appPaths, ILibraryManager libraryManager)
|
|
{
|
|
{
|
|
_appPaths = appPaths;
|
|
_appPaths = appPaths;
|
|
|
|
+ _libraryManager = libraryManager;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -368,6 +370,11 @@ namespace MediaBrowser.Controller.Library
|
|
return GetFileSystemEntryByName(name) != null;
|
|
return GetFileSystemEntryByName(name) != null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public string GetCollectionType()
|
|
|
|
+ {
|
|
|
|
+ return Parent == null ? null : _libraryManager.FindCollectionType(Parent);
|
|
|
|
+ }
|
|
|
|
+
|
|
#region Equality Overrides
|
|
#region Equality Overrides
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|