chore: sync development to main#2869
Conversation
…2867) Excluding a single episode used to skip every other episode of the same show. The cascade filter keyed off `Exclusion.parent`, but `parent` is the entry point of the exclusion request (set to `data.mediaId`, which from the show overview is always the show id) — not the structural parent. A typed cascade set driven by `mediaServerId` of `type='show'`/`'season'` rows fixes the regression without breaking the legacy null-type fallback.
* fix(collections): sort by addDate and group episodes by show Maintainerr is now the source of truth for collection ordering: both the Plex push and the UI fetch use the same comparator, so what users see in the collection page matches what the media server displays. - deleteSoonest now reads collection_media.addDate (drives the visible "Leaving in X days" overlay) instead of MediaItem.addedAt (the unrelated media-server library date) - Same-day items tie via UTC day bucketing so the title tiebreaker actually fires within a "Leaving Today" group - Title sort groups episodes/seasons under their show via grandparentTitle/parentTitle; movies are unaffected * refactor(sort): pin missing values to end + DRY numeric branches - Items missing the sort value (no air date, no rating, no view count, no add date) now sort to the end regardless of asc/desc. Previously they coerced to 0 and silently sorted to the front in ascending order — an item with no air date appeared before one from 1995. - airDate, rating, watchCount, and deleteSoonest collapse onto one helper (compareNumericWithTitleFallback), removing three near-identical case bodies in compareMediaItemsBySort. - airDate now day-buckets like deleteSoonest, so same-day items always reach the title tiebreaker instead of comparing by clock time. - Pin tsBuildInfoFile in apps/server/tsconfig.build.json so nest-cli's type-check pass stops emitting a stray tsconfig.build.tsbuildinfo at the package root. * refactor(sort): align deleteSoonest buckets with visible daysLeft - Bucket deleteSoonest by `ceil((addDate - referenceTime) / dayMs)` so items showing the same "Leaving in X days" countdown tie even when their addDates straddle UTC midnight. Falls back to UTC-day bucketing when no reference time is supplied. - Wire `referenceTime = now - deleteAfterDays * dayMs` through the two collection sort paths (applyCollectionSort + paginated fetch). - Replace the show-aware title test data — old data alphabetized identically under either comparator and didn't actually prove the grouping behavior. New data interleaves episode titles across shows and asserts on [show, episode] pairs. - Drop dead `baseUrl` + `paths` from apps/ui/tsconfig.json (unused alias) to clear the TS 6 deprecation surfaced in the IDE. * perf(collections): restore SQL fast path for deleteSoonest paging Page-loading a collection with `deleteSoonest` was hydrating every row in the collection before slicing — minutes-long blocking page loads on collections of a few hundred items, especially on Jellyfin where `getMetadata` isn't cached at the adapter layer. `deleteSoonest` orders by `addDate + deleteAfterDays`, but `deleteAfterDays` is constant per collection, so the only sort key that matters lives on `collection_media.addDate`. SQL can paginate it directly without touching MediaItem metadata. `applyCollectionSort` (the media-server push) still applies the day-bucketed title tiebreaker via the comparator, so the polished alphabetical-within-day order is what users see when browsing the actual Plex/Jellyfin collection. The Maintainerr UI page may show same-day items in a slightly different order — acceptable because the primary sort key is correct and Maintainerr's DB remains the source of truth driving the next push. Other explicit sorts (airDate / rating / watchCount / title) still go through hydrate-then-paginate because their sort keys live on MediaItem, not on collection_media.
📚 Docs drift reportComparing Rule glossary parity
Glossary is in sync with the code. New migrations on this branchNo new migrations. Rule constantsNo changes to Public contracts (
|
|
🚀
|
|
🎉 This PR is included in version 3.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Promotes
developmenttomainfor release. Squash-merge when approved; release automation continues on approval.Changes