aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/ItemResolveArgs.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemResolveArgs.cs')
-rw-r--r--MediaBrowser.Controller/Library/ItemResolveArgs.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
index 2bae106f3..daecefe5c 100644
--- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs
+++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
@@ -370,9 +370,18 @@ namespace MediaBrowser.Controller.Library
return GetFileSystemEntryByName(name) != null;
}
+ private bool _collectionTypeDiscovered;
+ private string _collectionType;
+
public string GetCollectionType()
{
- return Parent == null ? null : _libraryManager.FindCollectionType(Parent);
+ if (!_collectionTypeDiscovered)
+ {
+ _collectionType = Parent == null ? null : _libraryManager.FindCollectionType(Parent);
+ _collectionTypeDiscovered = true;
+ }
+
+ return _collectionType;
}
#region Equality Overrides