fix: emit collection notification events only after successful operations#2429
Merged
ydkmlt84 merged 9 commits intoFeb 28, 2026
Merged
Conversation
c2e84cc to
48f300c
Compare
…ions Move CollectionMedia_Added/Removed event emissions to after the actual addToCollection/removeFromCollection calls and verify against DB state. Only items that were actually added or removed trigger notifications. Also narrow manual sync removal to only isManual items, preventing rule-added items from being incorrectly removed during media server sync. Fixes Maintainerr#2412
48f300c to
59a6499
Compare
Merged
Makes the data dependency between handleCollection and syncManualMediaServerToCollectionDB explicit by returning the set from handleCollection and passing it as a parameter, removing fragile mutable class-level state.
enoch85
added a commit
that referenced
this pull request
Feb 28, 2026
PR #2396 - feat(settings): unify connection-test error handling across services - Added shared backend/frontend error helpers for connection tests - Reduced connection test timeout to 3s and parallelized tests - Normalized user-facing error messages across all service test endpoints PR #2429 - fix: emit collection notification events only after successful operations - Moved event emissions to after operations complete - Only emits events for items that were truly added/removed - Pass touchedMediaServerIds to prevent incorrect removals during sync PR #2436 - fix(server): resolve Seerr addUser returning NULL - Use username fields directly from Seerr API response instead of media server ID lookup - Use workspace-local typeorm migration cli - Use initial setup terminology for media server success log - Added 11 unit tests for addUser covering all user types and edge cases
Contributor
|
🎉 This PR is included in version 3.0.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What issue is solved
Issue #2412 — users receive repeated notifications about the same media being added to collections every rule run cycle.
How
Previously, CollectionMedia_Added / CollectionMedia_Removed events were emitted before the actual add/remove operations ran. If the media server rejected an item (e.g. HTTP 400), the notification was already sent but the item was never recorded in the DB — causing it to be retried and re-notified on every subsequent rule run.
The fix: