| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Bugfix: #17547 | Batching MediaSourceCount into one call
|
|
Fix PersonTypes not applied when filtering by person
|
|
fix: correct IsAiring negation to exclude airing items
|
|
Cleanup and simplify query helpers
|
|
|
|
|
|
Filter the parent ids with the WhereOneOrMany query helper instead of a
raw Contains so the id list is wrapped in EF.Parameter and EF Core reuses
one compiled query plan across calls, matching how the rest of the item
queries build their id filters.
|
|
Rename GetItemsWithAlternateVersions to GetItemIdsWithAlternateVersions
across the interfaces and implementations since it returns ids. Return
the hashset straight from the query instead of materializing an array
first. Rename the DtoService guard to mayHaveAlternateVersions and
invert it so the computed path is the explicit case. Assert the media
source count value in the batch skip test and add a test covering an
item that is in the returned set still resolving to the correct count.
|
|
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.
|
|
Batch people lookups when building item DTOs
|
|
Fix by-name endpoints reporting TotalRecordCount=0 next to a populated Items array
|
|
GetBaseItemDtos already batch fetches user data, child counts, played counts
and artists before its per item loop, but AttachPeople still ran one GetPeople
query per item. Rendering a page of items (for example a large playlist) fired
one extra query per row.
Add GetPeopleByItems to IPeopleRepository, which reads every requested item in a
single query over the people mapping table and returns full PersonInfo (role,
type and sort order) grouped by item id. GetBaseItemDtos prefetches this once
when the People field is requested and passes it into AttachPeople, which reads
from the batch instead of querying per item. The single item GetBaseItemDto path
keeps its existing per item behaviour when no batch is supplied.
Adds a DtoService test asserting people resolve from the batch and the per item
GetPeople is never called.
|
|
|
|
This makes the deletion of BaseItemProviders, BaseItemImageInfos, and BaseItemMetadataFields happen in batch as a contiguous block so the lock isn't held across items, just before the bulk SaveChanges.
|
|
Replace the O(n²) array .First scan with a dictionary lookup
|
|
Makes the test O(log n)
|
|
|
|
# Conflicts:
# Jellyfin.Server.Implementations/Item/BaseItemRepository.cs
|
|
array
`GetItemValues` -- the shared path behind `/Artists`, `/AlbumArtists`, `/Genres`,
`/MusicGenres` and `/Studios` -- disabled the total record count whenever the
query carried no `Limit`:
if (!filter.Limit.HasValue)
{
filter.EnableTotalRecordCount = false;
}
A request without an explicit limit therefore came back with N entries in `Items`
and `TotalRecordCount = 0`. Clients that page on the reported total -- the
documented contract every other list endpoint honours -- read that as an empty
library. `/Items` and `/Persons` do not share this path and report the count
correctly, which is what makes the inconsistency visible from the outside.
Measured against master with a 62-track music library:
GET /Artists?UserId=... -> TotalRecordCount=0 Items=5
GET /Artists?UserId=...&limit=100 -> TotalRecordCount=5 Items=5
Dropping the block costs nothing: `representativeIds` is materialised into a
`List<Guid>` a few lines below regardless, so `.Count` was already available and
the count is now reported from it. Callers that genuinely want to skip the count
still can -- `EnableTotalRecordCount = false` is honoured as before.
The block also mutated the caller's own query object, so a query instance reused
across calls silently lost its total after the first limitless one. That is
covered by a test as well.
|
|
|
|
|
|
|
|
Fix extras naming and version assignment
|
|
Use CleanName when sorting by name
|
|
Fix AdjacentTo being ignored on non-recursive item queries
|
|
Fix video version links being read from stale serialised item data instead of the LinkedChildren table
|
|
Add Tmdb missing episode provider
|
|
# Conflicts:
# src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs
|
|
and type
|
|
# Conflicts:
# Jellyfin.Server.Implementations/Item/BaseItemRepository.QueryBuilding.cs
|
|
Fix storage info lookup for Windows
|
|
Fix (Un)Played filter correctness and performance
|
|
Queue person metadata refresh instead of blocking the item request and fix ItemCounts
|
|
Allow duplicate LinkedChildren for Playlists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of the LinkedChildren table
|
|
|
|
user can access
|
|
|
|
|
|
ItemCounts
|
|
|