Commit graph

147 commits

Author SHA1 Message Date
Shadowghost
ca06ccfa13 Populate missing tags array in Filters2 2026-09-09 09:48:55 +02:00
Shadowghost
2644163f57 Count distinct items for byName ItemCounts and batch every kind 2026-09-07 18:39:59 +02:00
Shadowghost
59cd5f983b Expose optimized ItemCounts for byName items 2026-09-07 10:30:01 +02:00
Shadowghost
27d898e59e Count a season's episodes by the season they belong to 2026-08-29 21:39:14 +02:00
Shadowghost
6978dfc294 Delete a credit once no item maps to it any more 2026-08-25 20:31:30 +02:00
brandon
10d108a1f4 Address review on MediaSourceCount batching
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.
2026-08-08 12:33:11 -04:00
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
brandon
d6da6906a4 Batch people lookups when building item DTOs
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.
2026-08-07 11:59:17 -04:00
Shadowghost
d64e18b69a Fix more filter cases 2026-07-29 09:35:20 +02:00
Shadowghost
eed664b7d3 Fix played/unplayed filter for empty Series and BoxSets 2026-07-28 12:43:12 +02:00
Cody Robibero
526f4051e9
Merge pull request #16980 from TheMelmacian/feature/library_specific_language_filter_values
Improve language filters to only fetch language codes that match the requested items/libraries (follow up to #9787)
2026-07-21 20:43:31 -04:00
Tim Eisele
63d1af5fe7
Fix similarity (#16942)
Fix similarity
2026-05-31 17:21:15 +02:00
TheMelmacian
7939f3b009 only fetch language codes for the requested library when generating filter values 2026-05-30 16:33:59 +02:00
Sam Xie
c9f71d8531
Add a collection API for Included In feature (#15516)
Add a collection API for `Included In` feature
2026-05-29 20:00:34 +02:00
Bond-009
2f17516d4b
Merge pull request #16856 from Shadowghost/movie-recommendations
Fix movie recommendations
2026-05-27 20:59:18 +02:00
Shadowghost
97c20e6ac5 Fix movie recommendations 2026-05-15 14:37:01 +02:00
TheMelmacian
39049a726e move language filters from QueryFiltersLegacy to QueryFilters 2026-05-12 02:12:14 +02:00
Niels van Velzen
dcba6c3659
Merge pull request #16616 from dkanada/fix-person-limit
fix person TotalRecordCount when limit is applied
2026-05-04 17:58:27 +02:00
dkanada
ec990be12a fix person TotalRecordCount when limit is applied 2026-05-04 12:06:11 +09:00
Shadowghost
00b08c0b32 Omit BoxSet related materialization 2026-05-03 13:26:30 +02:00
Shadowghost
077fa89717 Split BaseItemRepository and IItemRepository 2026-03-07 20:12:42 +01:00
Shadowghost
2d0d497961 Update saved metadata on primary change 2026-02-25 21:03:46 +01:00
Shadowghost
3a090a5716 Optimize item count calculation for named items 2026-02-18 20:28:42 +01:00
Shadowghost
268d88a5fb Optimize Collection Grouping, NextUp and Latest queries 2026-02-07 01:38:06 +01:00
Shadowghost
a0346fe5b7 Fix multiple version handling 2026-02-05 01:41:07 +01:00
Shadowghost
2789532aa8 Optimize Validator and Filter Performance 2026-01-31 19:22:04 +01:00
Shadowghost
694db80d4c Reroute on version removal 2026-01-31 19:21:36 +01:00
Shadowghost
5996c4afce Complete LinkedChildren integration and batch DTO optimizations
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
2026-01-18 19:48:46 +01:00
MarcoCoreDuo
09edca8b7a Backport pull request #15899 from jellyfin/release-10.11.z
Fix watched state not kept on Media replace/rename

Original-merge: 8433b6d8a4

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
2026-01-18 11:30:38 -05:00
Luigi311
771b0a7eab
Library: Async the SaveImages function (#15718) 2025-12-13 08:43:49 -07:00
Tim Eisele
5c519270b8
Remove chapters on file change (#14984) 2025-10-13 12:32:41 -06:00
JPVenson
5a6d9180fe
Add People Dedup and multiple progress fixes (#14848) 2025-09-24 15:20:30 -06:00
JPVenson
a0b3e2b071
Optimize internal querying of UserData, other fixes (#14795) 2025-09-16 13:08:04 -06:00
Cody Robibero
beca405ad4 Refactor to pull item counts in a single query 2025-08-11 21:06:04 -06:00
JPVenson
4cd0a2ed8d
Always set update action when item does not exist (#14304) 2025-06-15 15:19:57 -06:00
Tim Eisele
d976f13970
Recognize file changes and remove data on change (#13839) 2025-05-04 21:21:44 -06:00
Tim Eisele
df5671263f
Merge pull request #13847 from Shadowghost/rework-chapter-management
Rework chapter management
2025-04-26 14:01:12 +02:00
Tim Eisele
0573999d5e
Import Keyframes into database (#13771)
* Migrate keyframe data into database

* Clear database table before import to handle failed migrations
2025-04-02 18:06:40 -06:00
JQ
d06ce1f1e0
Fix only returning one item from /Item/Latest api. (#12492)
* Updated to EFcore

* Remove unused using

* Dont use DateCreated not from episode type or music type

* use TranslateQuery to filter out instead and then do the grouping and retrival of min and max datecreated instead

* Album also
2025-03-26 20:26:47 -06:00
Cody Robibero
85b5bebda4
Add fast-path to getting just the SeriesPresentationUniqueKey for NextUp (#13687)
* Add more optimized query to calculate series that should be processed for next up

* Filter series based on last watched date
2025-03-18 17:37:04 -06:00
JPVenson
d716a53ec2 Applied review comments 2025-01-11 18:13:16 +00:00
JPVenson
6a08361f6f Applied review comments 2024-11-24 10:58:09 +00:00
JPVenson
e20ecfc670 applied review comments 2024-10-11 14:16:42 +00:00
JPVenson
058a567e00 Removed unused mapping tables 2024-10-11 11:46:43 +00:00
JPVenson
ae641b7f3a Applied review comments 2024-10-10 19:27:26 +00:00
JPVenson
473628ba3a
Apply suggestions from code review
Co-authored-by: Cody Robibero <cody@robibe.ro>
2024-10-09 21:03:57 +02:00
JPVenson
be48cdd9e9 Naming refactoring and WIP porting of new interface repositories 2024-10-09 09:53:39 +00:00
JPVenson
15bf43e3ad Removed BaseSqliteRepository 2024-10-08 19:53:26 +00:00
JPVenson
6c819fe516 WIP BaseItem search refactoring 2024-10-08 12:27:27 +00:00
JPVenson
d0b4b2ddb3
Migrated UserData from library sqlite db to jellyfin.db 2024-09-07 19:07:34 +00:00