Cache BaseItemKind
This commit is contained in:
parent
32629cd7da
commit
0edf77994a
|
@ -40,6 +40,8 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// </summary>
|
||||
public abstract class BaseItem : IHasProviderIds, IHasLookupInfo<ItemLookupInfo>, IEquatable<BaseItem>
|
||||
{
|
||||
private BaseItemKind? _baseItemKind;
|
||||
|
||||
/// <summary>
|
||||
/// The trailer folder name.
|
||||
/// </summary>
|
||||
|
@ -2009,7 +2011,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
public BaseItemKind GetBaseItemKind()
|
||||
{
|
||||
return Enum.Parse<BaseItemKind>(GetClientTypeName());
|
||||
return _baseItemKind ??= Enum.Parse<BaseItemKind>(GetClientTypeName());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user