Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds per-seeding-rule torrent privacy scoping to the Download Cleaner, replacing the previous global “delete private torrents” toggle to support different cleanup behavior for public vs private torrents.
Changes:
- Introduces
TorrentPrivacyTypeon seeding rules (backend + frontend) and updates matching logic to apply rules based on a torrent’s privacy. - Removes the global
deletePrivatesetting and migrates existing configs to rule-levelprivacy_type. - Updates the settings UI and documentation to expose “Privacy Type” per seeding rule.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/docs/configuration/download-cleaner/index.mdx | Removes global delete-private docs and documents per-rule “Privacy Type”. |
| code/frontend/src/app/shared/models/download-cleaner-config.model.ts | Adds privacyType to category model and sets a default. |
| code/frontend/src/app/features/settings/download-cleaner/download-cleaner.component.ts | Adds privacy type select options; removes deletePrivate handling. |
| code/frontend/src/app/features/settings/download-cleaner/download-cleaner.component.html | Removes global toggle and adds per-category privacy type selector. |
| code/frontend/src/app/features/settings/download-cleaner/download-cleaner.component.scss | Minor layout adjustment in header alignment. |
| code/frontend/src/app/core/services/documentation.service.ts | Updates field-to-anchor mapping for the new privacyType field. |
| code/backend/Cleanuparr.Persistence/Models/Configuration/DownloadCleaner/SeedingRule.cs | Adds PrivacyType to persisted seeding rules. |
| code/backend/Cleanuparr.Persistence/Models/Configuration/DownloadCleaner/DownloadCleanerConfig.cs | Updates validation rules to account for privacy types. |
| code/backend/Cleanuparr.Infrastructure/Features/DownloadClient/DownloadService.cs | Updates rule selection to filter by PrivacyType vs torrent privacy. |
| code/backend/Cleanuparr.Api/Features/DownloadCleaner/Controllers/DownloadCleanerConfigController.cs | Persists PrivacyType from requests when saving rules. |
| code/backend/Cleanuparr.Api/Features/DownloadCleaner/Contracts/Requests/UpdateDownloadCleanerConfigRequest.cs | Removes DeletePrivate from the update contract. |
| code/backend/Cleanuparr.Api/Features/DownloadCleaner/Contracts/Requests/SeedingRuleRequest.cs | Adds PrivacyType to seeding rule requests (with a default). |
| code/backend/Cleanuparr.Persistence/Migrations/Data/DataContextModelSnapshot.cs | Snapshot updates for new privacy_type and removed delete_private. |
| code/backend/Cleanuparr.Persistence/Migrations/Data/20260216220150_AddSeedingRulePrivacyType.cs | Migration to add privacy_type and backfill from prior global setting. |
| code/backend/Cleanuparr.Persistence/Migrations/Data/20260216220150_AddSeedingRulePrivacyType.Designer.cs | EF migration designer output. |
| code/backend/Cleanuparr.Persistence.Tests/Models/Configuration/DownloadCleaner/DownloadCleanerConfigTests.cs | Updates/extends validation tests for privacy-type rules. |
Files not reviewed (1)
- code/backend/Cleanuparr.Persistence/Migrations/Data/20260216220150_AddSeedingRulePrivacyType.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
code/frontend/src/app/shared/models/download-cleaner-config.model.ts:35
createDefaultCategory()defaultsprivacyTypetoBoth, which makes newly-added seeding rules apply to private torrents by default. This is a potentially destructive behavior change compared to the previous default (deletePrivatedefaulted to false in the UI) and it’s also inconsistent with the API DTO defaultingPrivacyTypetoPublic. Consider defaulting new categories toPublic(opt-in to private cleanup) and ensure docs/UI messaging match the intended default.
export function createDefaultCategory(): CleanCategory {
return {
name: '',
privacyType: TorrentPrivacyType.Both,
maxRatio: -1,
minSeedTime: 0,
maxSeedTime: -1,
deleteSourceFiles: true,
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...backend/Cleanuparr.Persistence/Models/Configuration/DownloadCleaner/DownloadCleanerConfig.cs
Outdated
Show resolved
Hide resolved
code/backend/Cleanuparr.Infrastructure/Features/DownloadClient/DownloadService.cs
Show resolved
Hide resolved
code/backend/Cleanuparr.Api/Features/DownloadCleaner/Contracts/Requests/SeedingRuleRequest.cs
Show resolved
Hide resolved
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.
Relates to #371 #341