mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-18 20:24:20 +01:00
add additional view settings
This commit is contained in:
@@ -4,13 +4,13 @@ using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MoreLinq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MoreLinq;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Collections
|
||||
{
|
||||
@@ -27,6 +27,12 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
_iLibraryMonitor = iLibraryMonitor;
|
||||
}
|
||||
|
||||
public Folder GetCollectionsFolder(string userId)
|
||||
{
|
||||
return _libraryManager.RootFolder.Children.Concat(_libraryManager.RootFolder.GetHiddenChildren()).OfType<ManualCollectionsFolder>()
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public async Task<BoxSet> CreateCollection(CollectionCreationOptions options)
|
||||
{
|
||||
var name = options.Name;
|
||||
@@ -104,8 +110,7 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
}
|
||||
}
|
||||
|
||||
return _libraryManager.RootFolder.Children.OfType<ManualCollectionsFolder>().FirstOrDefault() ??
|
||||
_libraryManager.RootFolder.GetHiddenChildren().OfType<ManualCollectionsFolder>().FirstOrDefault();
|
||||
return GetCollectionsFolder(string.Empty);
|
||||
}
|
||||
|
||||
public async Task AddToCollection(Guid collectionId, IEnumerable<Guid> ids)
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsHiddenFromUser(User user)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override string CollectionType
|
||||
{
|
||||
get { return Model.Entities.CollectionType.BoxSets; }
|
||||
|
||||
Reference in New Issue
Block a user