You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Server.Impleme.../Collections/ManualCollectionsFolder.cs

45 lines
1.1 KiB

using MediaBrowser.Controller.Entities;
10 years ago
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)
{
10 years ago
return base.IsVisible(user) && GetChildren(user, false)
10 years ago
.OfType<BoxSet>()
.Any(i => i.IsVisible(user));
}
public override bool IsHidden
{
get
{
return true;
}
}
11 years ago
public override bool IsHiddenFromUser(User user)
{
return !user.Configuration.DisplayCollectionsView;
}
11 years ago
public override string CollectionType
{
get { return Model.Entities.CollectionType.BoxSets; }
}
public override string GetClientTypeName()
{
return typeof (CollectionFolder).Name;
}
}
}