fix(collections): drop redundant Jellyfin/Emby empty-collection delete, keep repopulate#3137
Merged
Merged
Conversation
…elete, keep repopulate The #3129 heal added a delete-when-genuinely-empty path to checkAutomaticMediaServerLink for Jellyfin/Emby. That duplicated existing, Maintainerr-driven behaviour: when handling empties an automatic collection, removeFromCollection already deletes the BoxSet (or unlinks it when a sibling rule group shares it), and the (!serverColl) clear-link path already recovers a collection whose BoxSet is gone. It also carried a transient child-read deletion risk on that redundant path. Keep only the genuinely-new behaviour for #3129 — re-add rule-owned DB items missing from a still-present, under-populated BoxSet, reusing the existing resync helper (shared with the Plex branch) — and leave all removal to that existing flow. Jellyfin/Emby do not auto-delete an empty BoxSet; Maintainerr triggers it. Drops the delete gate and its four tests.
64d3466 to
54a6c47
Compare
enoch85
added a commit
that referenced
this pull request
Jun 20, 2026
* fix(collections): drop the redundant Jellyfin/Emby empty-collection delete, keep repopulate (#3137) The #3129 heal added a delete-when-genuinely-empty path to checkAutomaticMediaServerLink for Jellyfin/Emby. That duplicated existing, Maintainerr-driven behaviour: when handling empties an automatic collection, removeFromCollection already deletes the BoxSet (or unlinks it when a sibling rule group shares it), and the (!serverColl) clear-link path already recovers a collection whose BoxSet is gone. It also carried a transient child-read deletion risk on that redundant path. Keep only the genuinely-new behaviour for #3129 — re-add rule-owned DB items missing from a still-present, under-populated BoxSet, reusing the existing resync helper (shared with the Plex branch) — and leave all removal to that existing flow. Jellyfin/Emby do not auto-delete an empty BoxSet; Maintainerr triggers it. Drops the delete gate and its four tests. * test(collections): cover empty Jellyfin and Emby no-local heal --------- Co-authored-by: enoch85 <[email protected]>
Contributor
|
🎉 This PR is included in version 3.15.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
doonga
pushed a commit
to greyrock-labs/home-ops
that referenced
this pull request
Jun 20, 2026
…➔ 3.15.2) (#349) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/maintainerr/maintainerr](https://github.com/Maintainerr/Maintainerr) | patch | `3.15.1` → `3.15.2` | --- ### Release Notes <details> <summary>Maintainerr/Maintainerr (ghcr.io/maintainerr/maintainerr)</summary> ### [`v3.15.2`](https://github.com/Maintainerr/Maintainerr/blob/HEAD/CHANGELOG.md#3152-2026-06-20) [Compare Source](Maintainerr/Maintainerr@v3.15.1...v3.15.2) #### Highlights - Fixed transient failure handling for Sonarr and Radarr lookups, preventing data loss during rule evaluations under heavy load ([#​3125](Maintainerr/Maintainerr#3125), [#​3128](Maintainerr/Maintainerr#3128), [#​3139](Maintainerr/Maintainerr#3139)). - Resolved issues with Jellyfin/Emby automatic collections, ensuring proper handling of empty collections and preventing resurrection of deleted media-server links ([#​3129](Maintainerr/Maintainerr#3129), [#​3134](Maintainerr/Maintainerr#3134), [#​3135](Maintainerr/Maintainerr#3135), [#​3137](Maintainerr/Maintainerr#3137)). - Improved Streamystats watchlist handling by inheriting parent show information for season/episode-level rules, preventing unintended deletions or unmonitoring ([#​3127](Maintainerr/Maintainerr#3127), [#​3133](Maintainerr/Maintainerr#3133)). #### Fixes - Fixed transient failure handling for Sonarr and Radarr lookups, ensuring fail-closed behavior to prevent data loss during rule evaluations under heavy load ([#​3125](Maintainerr/Maintainerr#3125), [#​3128](Maintainerr/Maintainerr#3128), [#​3139](Maintainerr/Maintainerr#3139)). - Resolved issues with Jellyfin/Emby automatic collections: - Fixed empty collections not healing properly for Jellyfin/Emby servers ([#​3129](Maintainerr/Maintainerr#3129), [#​3134](Maintainerr/Maintainerr#3134)). - Prevented resurrection of deleted media-server links when handling empty collections ([#​3135](Maintainerr/Maintainerr#3135)). - Removed redundant empty-collection delete logic for Jellyfin/Emby, retaining only the repopulation path ([#​3137](Maintainerr/Maintainerr#3137)). - Improved Streamystats watchlist handling by inheriting parent show information for season/episode-level rules, preventing unintended deletions or unmonitoring ([#​3127](Maintainerr/Maintainerr#3127), [#​3133](Maintainerr/Maintainerr#3133)). #### Dependencies - Updated 12 dependencies, including [@​types/node](https://github.com/types/node), sharp, [@​faker-js/faker](https://github.com/faker-js/faker), and typescript-eslint. </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/349
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up trim to the #3129 heal.
The #3129 fix added a delete-when-genuinely-empty path to
checkAutomaticMediaServerLinkfor Jellyfin/Emby. On closer look (and against real-server logs) that path was redundant — removal of an empty automatic collection's BoxSet is already driven by Maintainerr:removeFromCollectiondeletes the media-server collection (or just unlinks it when a sibling rule group shares the BoxSet) — see fix(collections): don't resurrect a deleted collection's media-server link #3135. Jellyfin/Emby don't auto-delete an empty BoxSet; Maintainerr triggers the deletion.if (!serverColl)clear-link path recovers a collection whose BoxSet is already gone (and recreates it when items match again).It also carried the transient child-read deletion risk flagged in review, on a path that wasn't needed.
This keeps only the genuinely-new behaviour for #3129 — re-add rule-owned DB items missing from a still-present, under-populated BoxSet — reusing the existing resync helper (
resyncRuleOwnedItemsToMediaServerCollection, the same one the Plex shared-collection branch uses). All removal stays in the existing flow. Plex behaviour is untouched.Net: −177 lines (the delete gate + its four tests). The repopulate path and its tests stay.