| Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
|
|
|
|
|
|
Fixes for multi version handling
|
|
|
|
Added static method GetBaseItemKindsForCollectionType in ItemsController (moved from ContentFolderImageProvider to be shared)
Added AudioBook to GetRepresentativeItemTypes for CollectionType.books for consistency
Added GetBooks to GetUserItems for CollectionType.books which gets BaseItemKind.Book and BaseItemKind.AudioBook
Move GetBaseItemKindsForCollectionType to DtoExtensions
Cleaned up the missing null checks and used new collection expressions.
Associate Person to Book and AudioBook for related items.
|
|
|
|
|
|
fix(dto): prefer PlaylistsFolder primary image for playlists tiles
|
|
|
|
* Add OriginalLanguage as option to PreferredAudioLanguage
* Support for multiple original languages
* Add original audio stream indicator
* Fetch OriginalLanguage from TMDB
* Adapt to EFCore refactor
* Fix PlayDefaultAudioTrack OriginalLanguage behavior
* Fix better PlayDefaultAudioTrack OriginalLanguage behavior
* Add comment to ItemFields
* Improved PlayDefaultAudioTrack behavior
* Add migration for original language
* Use sting.Equals for string comparisons
* Always set dto OriginalLanguage
* Remove OriginalLanguage from ItemFields
---------
Co-authored-by: Lampan-git <lampan-git@users.noreply.github.com>
|
|
|
|
|
|
|
|
feat/audiobook_chapters
|
|
|
|
|
|
|
|
This patch fixes issue #16032 where the Playlists media folder ignored a user-uploaded Primary image and kept showing the generated collage. The root cause was DTO image precedence on UserView items for CollectionType.playlists. We now prefer the display parent (PlaylistsFolder) Primary image when available by clearing the UserView Primary tag and setting ParentPrimaryImageItemId/ParentPrimaryImageTag. Added tests cover both paths: parent custom image preferred, and fallback to existing UserView Primary when parent has none.
|
|
|
|
|
|
|
|
Fix artist display order
Original-merge: a2b1936e73f6638bf07d5e1afd339a1e4404027a
Merged-by: joshuaboniface <joshua@boniface.me>
Backported-by: Bond_009 <bond.009@outlook.com>
|
|
This commit integrates remaining performance changes:
- Add batch user data fetching in DtoService to reduce N+1 queries
- Add GetNextUpEpisodesBatch in TVSeriesManager for efficient batch retrieval
- Update Video/Movie/BoxSet to use LibraryManager for alternate versions
- Transition LinkedChild to use ItemId instead of Path (obsolete Path/LibraryItemId)
- Update providers and controllers for LinkedChildren-based references
- Add NextUpEpisodeBatchResult for batched episode queries
- Integrate IDescendantQueryProvider in SqliteDatabaseProvider
|
|
|
|
|
|
For API call /Items/{item id} GetBaseItemDto will return the counts of related items e.g. artists, albums, songs. GetBaseItemDto currently does this by calling GetTaggedItems which retrieves the objects into memory to count them. Replace with SQL count.
Fixes:
This should be an improvement for any large libraries, but especially large music libraries. Example:
Request Library -> Genres -> any very popular genre in your large library, e.g. Classical
Number of albums = 1552, songs = 23515, ...
- Before change: Try to retrieve 1552 albums, 23515 songs, ... in memory, API never returns, database on fire
- After change: API returns in 367ms and Genre view opens with 200 albums in 2 seconds
I verified the numbers returned are correct but note that there is a bug somewhere else in Jellyfin that is setting TopParentId to NULL for a large portion of my MusicArtists, which causes them to not be counted by the existing GetCount(). This is not related to this change, also happens with the existing code, and does not seem to affect the Web UI.
Includes Cory's changes in:
- https://github.com/jellyfin/jellyfin/pull/14610#issuecomment-3172211468
- https://github.com/jellyfin/jellyfin/pull/14610#issuecomment-3172239154
|
|
|
|
Rework chapter management
|
|
* Cleanup ItemFields
* Update MediaBrowser.Model/Querying/ItemFields.cs
|
|
|
|
|
|
|
|
|
|
* Move calculation of LUFS to a scheduled task as it's pretty slow
* Correctly calculate album LUFS
* Don't try to convert replaygain tags to LUFS values
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Add LUFSAlbum DTO
* Get loudest track for smallest gain
* Move gain search to musicalbum
use baseitem LUFS for album
* Use .Max for enumerable
* Update DTO to be consistent with other DTOs
* Remove albumlufs,
Move dto for all types
|
|
|
|
consistent use of tile and thumbnail
|
|
|
|
|