mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-15 20:20:25 +01:00
update image processing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
@@ -14,4 +15,17 @@ namespace MediaBrowser.Controller.Entities
|
||||
Guid Id { get; }
|
||||
IEnumerable<string> PhysicalLocations { get; }
|
||||
}
|
||||
|
||||
public static class CollectionFolderExtensions
|
||||
{
|
||||
public static string GetViewType(this ICollectionFolder folder, User user)
|
||||
{
|
||||
if (user.Configuration.PlainFolderViews.Contains(folder.Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return folder.CollectionType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,10 +264,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
private async Task<QueryResult<BaseItem>> FindPlaylists(Folder parent, User user, InternalItemsQuery query)
|
||||
{
|
||||
var collectionFolders = user.RootFolder.GetChildren(user, true).Select(i => i.Id).ToList();
|
||||
|
||||
var list = _playlistManager.GetPlaylists(user.Id.ToString("N"))
|
||||
.Where(i => i.GetChildren(user, true).Any(media => _libraryManager.GetCollectionFolders(media).Select(c => c.Id).Any(collectionFolders.Contains)));
|
||||
var list = _playlistManager.GetPlaylists(user.Id.ToString("N"));
|
||||
|
||||
return GetResult(list, parent, query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user