jellyfin-server/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs
Luke Pulverenti 6755937800 sync updates
2015-01-24 17:33:26 -05:00

45 lines
1.1 KiB
C#

using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using System.Linq;
namespace MediaBrowser.Server.Implementations.Collections
{
public class ManualCollectionsFolder : BasePluginFolder
{
public ManualCollectionsFolder()
{
Name = "Collections";
DisplayMediaType = "CollectionFolder";
}
public override bool IsVisible(User user)
{
return base.IsVisible(user) && GetChildren(user, false)
.OfType<BoxSet>()
.Any(i => i.IsVisible(user));
}
public override bool IsHidden
{
get
{
return true;
}
}
public override bool IsHiddenFromUser(User user)
{
return !user.Configuration.DisplayCollectionsView;
}
public override string CollectionType
{
get { return Model.Entities.CollectionType.BoxSets; }
}
public override string GetClientTypeName()
{
return typeof (CollectionFolder).Name;
}
}
}