Skip to content

Add seeding rule privacy type#449

Merged
Flaminel merged 3 commits intomainfrom
add_seeding_rule_privacy_type
Feb 21, 2026
Merged

Add seeding rule privacy type#449
Flaminel merged 3 commits intomainfrom
add_seeding_rule_privacy_type

Conversation

@Flaminel
Copy link
Contributor

@Flaminel Flaminel commented Feb 17, 2026

Relates to #371 #341

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ructure/Features/DownloadClient/DownloadService.cs 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TorrentPrivacyType on seeding rules (backend + frontend) and updates matching logic to apply rules based on a torrent’s privacy.
  • Removes the global deletePrivate setting and migrates existing configs to rule-level privacy_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() defaults privacyType to Both, which makes newly-added seeding rules apply to private torrents by default. This is a potentially destructive behavior change compared to the previous default (deletePrivate defaulted to false in the UI) and it’s also inconsistent with the API DTO defaulting PrivacyType to Public. Consider defaulting new categories to Public (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.

@Flaminel Flaminel merged commit d038738 into main Feb 21, 2026
8 checks passed
@Flaminel Flaminel deleted the add_seeding_rule_privacy_type branch February 21, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants