mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
improve genre displays
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Configuration
|
||||
{
|
||||
public class LibraryOptions
|
||||
{
|
||||
public bool EnableAudioArchiveFiles { get; set; }
|
||||
public bool EnableVideoArchiveFiles { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MoreLinq;
|
||||
|
||||
|
||||
@@ -16,6 +16,31 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
public class UserRootFolder : Folder
|
||||
{
|
||||
private List<Guid> _childrenIds = null;
|
||||
private readonly object _childIdsLock = new object();
|
||||
//protected override IEnumerable<BaseItem> LoadChildren()
|
||||
//{
|
||||
// lock (_childIdsLock)
|
||||
// {
|
||||
// if (_childrenIds == null)
|
||||
// {
|
||||
// var list = base.LoadChildren().ToList();
|
||||
// _childrenIds = list.Select(i => i.Id).ToList();
|
||||
// return list;
|
||||
// }
|
||||
|
||||
// return _childrenIds.Select(LibraryManager.GetItemById).Where(i => i != null).ToList();
|
||||
// }
|
||||
//}
|
||||
|
||||
private void ResetCachedChildren()
|
||||
{
|
||||
lock (_childIdsLock)
|
||||
{
|
||||
_childrenIds = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task<QueryResult<BaseItem>> GetItemsInternal(InternalItemsQuery query)
|
||||
{
|
||||
if (query.Recursive)
|
||||
@@ -69,6 +94,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public override bool BeforeMetadataRefresh()
|
||||
{
|
||||
ResetCachedChildren();
|
||||
|
||||
var hasChanges = base.BeforeMetadataRefresh();
|
||||
|
||||
if (string.Equals("default", Name, StringComparison.OrdinalIgnoreCase))
|
||||
@@ -82,6 +109,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
protected override async Task ValidateChildrenInternal(IProgress<double> progress, CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
|
||||
{
|
||||
ResetCachedChildren();
|
||||
|
||||
await base.ValidateChildrenInternal(progress, cancellationToken, recursive, refreshChildMetadata, refreshOptions, directoryService)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
<Compile Include="Collections\CollectionCreationOptions.cs" />
|
||||
<Compile Include="Collections\CollectionEvents.cs" />
|
||||
<Compile Include="Collections\ICollectionManager.cs" />
|
||||
<Compile Include="Configuration\LibraryOptions.cs" />
|
||||
<Compile Include="Connect\ConnectSupporterSummary.cs" />
|
||||
<Compile Include="Connect\IConnectManager.cs" />
|
||||
<Compile Include="Connect\UserLinkResult.cs" />
|
||||
|
||||
Reference in New Issue
Block a user