diff options
| author | Shadowghost <Shadowghost@users.noreply.github.com> | 2026-09-15 11:15:46 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-09-15 11:15:46 -0400 |
| commit | 006ecadbe041ea422b34adf6a3fcf6638d189a70 (patch) | |
| tree | c845d30aafd6cb23bf2e41dd955712db0f641ce4 /Emby.Server.Implementations/Library/UserViewManager.cs | |
| parent | 65bc888b07a25d1883d4d0a2f55a7f3e1ac35c87 (diff) | |
Backport pull request #17881 from jellyfin/release-12.z
Fix /UserViews exhausting memory and reporting random child counts
Original-merge: a838a06aa51eac388a76e9e6421f1a80873c417b
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'Emby.Server.Implementations/Library/UserViewManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserViewManager.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 47b3891901..231dbe6429 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -60,7 +60,16 @@ namespace Emby.Server.Implementations.Library var folderViewType = collectionFolder?.CollectionType; // Playlist and BoxSet libraries require special handling because the folder only references linked items - if (folderViewType == CollectionType.playlists || folderViewType == CollectionType.boxsets) + if (folderViewType == CollectionType.boxsets) + { + // Only the existence of one visible box set matters here, so probe the children + // lazily and stop at the first hit. + if (!folder.Children.Any(item => item.IsVisible(user))) + { + continue; + } + } + else if (folderViewType == CollectionType.playlists) { var items = folder.GetItemList(new InternalItemsQuery(user) { |
