From e7e18af2d76e1d44a9ca80644b9cd562059626c4 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 4 Sep 2013 13:07:35 -0400 Subject: fixes #433 - Add root collection type to ItemResolveArgs --- MediaBrowser.Controller/Library/ItemResolveArgs.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Library') diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 109ffe7e7..2bae106f3 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -1,5 +1,4 @@ using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.IO; using System; using System.Collections.Generic; using System.IO; @@ -17,14 +16,17 @@ namespace MediaBrowser.Controller.Library /// The _app paths /// private readonly IServerApplicationPaths _appPaths; + private readonly ILibraryManager _libraryManager; /// /// Initializes a new instance of the class. /// /// The app paths. - public ItemResolveArgs(IServerApplicationPaths appPaths) + /// The library manager. + public ItemResolveArgs(IServerApplicationPaths appPaths, ILibraryManager libraryManager) { _appPaths = appPaths; + _libraryManager = libraryManager; } /// @@ -368,6 +370,11 @@ namespace MediaBrowser.Controller.Library return GetFileSystemEntryByName(name) != null; } + public string GetCollectionType() + { + return Parent == null ? null : _libraryManager.FindCollectionType(Parent); + } + #region Equality Overrides /// -- cgit v1.2.3