This commit is contained in:
@@ -10,6 +10,7 @@ using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using CinemaLib.API;
|
||||
using Jellyfin.Data.Entities;
|
||||
|
||||
namespace Jellyfin.Plugin.Cinema;
|
||||
|
||||
@@ -27,41 +28,14 @@ public abstract class CinemaRootFolder : CinemaFilterFolder, ICollectionFolder
|
||||
public abstract CollectionType? CollectionType { get; }
|
||||
|
||||
public override bool IsHidden => _hidden;
|
||||
public override bool IsVisible(User user) => !_hidden;
|
||||
|
||||
internal bool Hide
|
||||
{
|
||||
get => _hidden;
|
||||
set
|
||||
{
|
||||
var a = CinemaHost.LibraryManager.RootFolder.VirtualChildren;
|
||||
if (a.Contains(this) == (!value))
|
||||
return;
|
||||
|
||||
this._hidden = value;
|
||||
|
||||
if (value)
|
||||
{
|
||||
// Remove ourselves
|
||||
var temp = new List<BaseItem>();
|
||||
while (!a.IsEmpty)
|
||||
{
|
||||
if (!a.TryTake(out BaseItem? b))
|
||||
continue;
|
||||
|
||||
if (b == this)
|
||||
break;
|
||||
temp.Add(b);
|
||||
}
|
||||
foreach (var i in temp)
|
||||
a.Add(i);
|
||||
}
|
||||
else
|
||||
// Add ourselves
|
||||
a.Add(this);
|
||||
}
|
||||
set => _hidden = value;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
public Task<DynamicImageResponse> GetChannelImage(ImageType type, CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user