jellyfin/Emby.Server.Implementations/Library
brandon c091ffdc6b Batch alternate version detection in DtoService to remove MediaSourceCount N+1
Browsing a page of videos with the MediaSourceCount field ran one alternate
version query per item, each opening a fresh DbContext. On a large library that
turned a single page into hundreds of sequential round trips and made the Items
endpoint take tens of seconds while holding a request thread the whole time.

Detect which videos own alternate versions once per page with a single query,
mirroring the existing people batch. Videos absent from that set have a single
media source, so the per item lookups are skipped for the common case. Behavior
is unchanged: a video with no alternates already resolved to a count of one.

Adds a regression test asserting the count resolves from the batch and the per
item lookups are never called.
2026-08-07 22:51:45 -04:00
..
Resolvers Merge pull request #17456 from Shadowghost/fix-extras 2026-08-02 14:25:00 -04:00
Search Apply the by-name access exemption in the search candidate query 2026-07-30 09:53:44 +02:00
SimilarItems Limit similar items to user accessible libraries 2026-07-15 11:47:59 +02:00
Validators Fix missing collection folder posters after initial scans. 2026-06-09 20:34:24 +02:00
CoreResolutionIgnoreRule.cs Skip non-media folders in movie resolver (#14724) 2025-09-07 13:02:52 +02:00
DotIgnoreIgnoreRule.cs Fix Sonar comments 2026-05-04 02:16:00 +02:00
ExternalDataManager.cs Fix external data pruning on item deletion 2026-05-26 20:44:03 +02:00
IgnorePatterns.cs Add ignore patterns for Hungarian sample files (#16238) 2026-03-29 12:38:46 +02:00
KeyframeManager.cs Recognize file changes and remove data on change (#13839) 2025-05-04 21:21:44 -06:00
LibraryManager.cs Batch alternate version detection in DtoService to remove MediaSourceCount N+1 2026-08-07 22:51:45 -04:00
LiveStreamHelper.cs
MediaSourceManager.cs remove PlaybackPositionTicks from MediaSourceInfo 2026-07-14 10:05:32 +02:00
MediaStreamSelector.cs WIP fixed namespaces 2025-03-25 15:30:22 +00:00
MusicManager.cs Backport pull request #15133 from jellyfin/release-10.11.z 2025-10-27 15:43:17 -04:00
PathExtensions.cs Replaced string.Empty with ReadOnlySpan<char>.Empty 2026-07-08 01:40:26 +02:00
PathManager.cs Sanitize media attachment and lyric paths against traversal 2026-07-17 17:07:27 +02:00
ResolverHelper.cs Fix modification checks and make sure to use UTC (#14347) 2025-06-26 17:50:37 -06:00
SplashscreenPostScanTask.cs Set max rating for splashscreen to 13 2026-05-14 18:43:39 -04:00
UserDataManager.cs fix: avoid NRE when sorting by user-dependent keys without a user 2026-07-22 07:43:58 +02:00
UserViewManager.cs Fix BoxSet library visibility 2026-04-26 18:53:17 +02:00