mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2025-12-29 08:58:47 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb438f2ca7 | ||
|
|
d4de7f2ec3 | ||
|
|
98ee1943f9 | ||
|
|
4a57c0fba3 |
16
README.md
16
README.md
@@ -12,14 +12,14 @@ Cleanuparr was created primarily to address malicious files, such as `*.lnk` or
|
||||
> **Features:**
|
||||
> - Strike system to mark bad downloads.
|
||||
> - Remove and block downloads that reached a maximum number of strikes.
|
||||
> - Remove and block downloads that are **failing to be imported** by the arrs. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner/import-failed)
|
||||
> - Remove and block downloads that are **stalled** or in **metadata downloading** state. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner/stalled)
|
||||
> - Remove and block downloads that have a **low download speed** or **high estimated completion time**. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner/slow)
|
||||
> - Remove and block downloads blocked by qBittorrent or by Cleanuparr's **Content Blocker**. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/content-blocker/general)
|
||||
> - Remove and block downloads that are **failing to be imported** by the arrs. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner#failed-import-max-strikes)
|
||||
> - Remove and block downloads that are **stalled** or in **metadata downloading** state. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner#stalled-max-strikes)
|
||||
> - Remove and block downloads that have a **low download speed** or **high estimated completion time**. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/queue-cleaner#slow-max-strikes)
|
||||
> - Remove and block downloads blocked by qBittorrent or by Cleanuparr's **Content Blocker**. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/content-blocker)
|
||||
> - Automatically trigger a search for downloads removed from the arrs.
|
||||
> - Clean up downloads that have been **seeding** for a certain amount of time. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner/seeding)
|
||||
> - Remove downloads that are **orphaned**/have no **hardlinks**/are not referenced by the arrs anymore (with [cross-seed](https://www.cross-seed.org/) support). [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner/hardlinks)
|
||||
> - Notify on strike or download removal. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/category/notifications)
|
||||
> - Clean up downloads that have been **seeding** for a certain amount of time. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner#seeding-settings)
|
||||
> - Remove downloads that are **orphaned**/have no **hardlinks**/are not referenced by the arrs anymore (with [cross-seed](https://www.cross-seed.org/) support). [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/download-cleaner#enable-unlinked-downloads-management)
|
||||
> - Notify on strike or download removal. [configuration](https://cleanuparr.github.io/Cleanuparr/docs/configuration/notifications)
|
||||
> - Ignore certain torrent hashes, categories, tags or trackers from being processed by Cleanuparr.
|
||||
|
||||
Cleanuparr supports both qBittorrent's built-in exclusion features and its own blocklist-based system. Binaries for all platforms are provided, along with Docker images for easy deployment.
|
||||
@@ -39,7 +39,7 @@ Cleanuparr supports both qBittorrent's built-in exclusion features and its own b
|
||||
|
||||
# Docs
|
||||
|
||||
Docs can be found [here](https://Cleanuparr.github.io/Cleanuparr/).
|
||||
Docs can be found [here](https://cleanuparr.github.io/Cleanuparr/).
|
||||
|
||||
# <img style="vertical-align: middle;" width="24px" src="./Logo/256.png" alt="Cleanuparr"> <span style="vertical-align: middle;">Cleanuparr</span> <img src="https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/solid/x.svg" height="24px" width="30px" style="vertical-align: middle;"> <span style="vertical-align: middle;">Huntarr</span> <img style="vertical-align: middle;" width="24px" src="https://github.com/plexguide/Huntarr.io/blob/main/frontend/static/logo/512.png?raw=true" alt Huntarr></img>
|
||||
|
||||
|
||||
@@ -168,9 +168,7 @@ public sealed class DelugeClient
|
||||
content.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/json");
|
||||
|
||||
UriBuilder uriBuilder = new(_config.Url);
|
||||
uriBuilder.Path = string.IsNullOrEmpty(_config.UrlBase)
|
||||
? $"{uriBuilder.Path.TrimEnd('/')}/json"
|
||||
: $"{uriBuilder.Path.TrimEnd('/')}/{_config.UrlBase.TrimStart('/').TrimEnd('/')}/json";
|
||||
uriBuilder.Path = $"{uriBuilder.Path.TrimEnd('/')}/json";
|
||||
var responseMessage = await _httpClient.PostAsync(uriBuilder.Uri, content);
|
||||
responseMessage.EnsureSuccessStatusCode();
|
||||
|
||||
|
||||
@@ -238,6 +238,8 @@ public partial class QBitService
|
||||
}
|
||||
|
||||
await _dryRunInterceptor.InterceptAsync(ChangeCategory, download.Hash, downloadCleanerConfig.UnlinkedTargetCategory);
|
||||
|
||||
await _eventPublisher.PublishCategoryChanged(download.Category, downloadCleanerConfig.UnlinkedTargetCategory, downloadCleanerConfig.UnlinkedUseTag);
|
||||
|
||||
if (downloadCleanerConfig.UnlinkedUseTag)
|
||||
{
|
||||
@@ -248,8 +250,6 @@ public partial class QBitService
|
||||
_logger.LogInformation("category changed for {name}", download.Name);
|
||||
download.Category = downloadCleanerConfig.UnlinkedTargetCategory;
|
||||
}
|
||||
|
||||
await _eventPublisher.PublishCategoryChanged(download.Category, downloadCleanerConfig.UnlinkedTargetCategory, downloadCleanerConfig.UnlinkedUseTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +53,7 @@ public partial class TransmissionService : DownloadService, ITransmissionService
|
||||
)
|
||||
{
|
||||
UriBuilder uriBuilder = new(_downloadClientConfig.Url);
|
||||
uriBuilder.Path = string.IsNullOrEmpty(_downloadClientConfig.UrlBase)
|
||||
? $"{uriBuilder.Path.TrimEnd('/')}/rpc"
|
||||
: $"{uriBuilder.Path.TrimEnd('/')}/{_downloadClientConfig.UrlBase.TrimStart('/').TrimEnd('/')}/rpc";
|
||||
uriBuilder.Path = $"{uriBuilder.Path.TrimEnd('/')}/rpc";
|
||||
_client = new Client(
|
||||
_httpClient,
|
||||
uriBuilder.Uri.ToString(),
|
||||
|
||||
@@ -363,8 +363,9 @@ export class DownloadClientSettingsComponent implements OnDestroy, CanComponentD
|
||||
const clientType = this.clientForm.get('type')?.value;
|
||||
const hostControl = this.clientForm.get('host');
|
||||
const usernameControl = this.clientForm.get('username');
|
||||
const urlBaseControl = this.clientForm.get('urlBase');
|
||||
|
||||
if (!hostControl || !usernameControl) return;
|
||||
if (!hostControl || !usernameControl || !urlBaseControl) return;
|
||||
|
||||
hostControl.setValidators([
|
||||
Validators.required,
|
||||
@@ -377,6 +378,11 @@ export class DownloadClientSettingsComponent implements OnDestroy, CanComponentD
|
||||
usernameControl.clearValidators();
|
||||
}
|
||||
|
||||
// Set default URL base for Transmission
|
||||
if (clientType === DownloadClientType.Transmission) {
|
||||
urlBaseControl.setValue('transmission');
|
||||
}
|
||||
|
||||
// Update validation state
|
||||
hostControl.updateValueAndValidity();
|
||||
usernameControl.updateValueAndValidity();
|
||||
|
||||
@@ -25,7 +25,6 @@ These settings need a download client to be configured.
|
||||
<ConfigSection
|
||||
id="enable-content-blocker"
|
||||
title="Enable Content Blocker"
|
||||
description="When enabled, the Content Blocker will run according to the configured schedule to automatically block or remove downloads based on the configured blocklists."
|
||||
icon="🔄"
|
||||
>
|
||||
|
||||
@@ -36,7 +35,6 @@ When enabled, the Content Blocker will run according to the configured schedule
|
||||
<ConfigSection
|
||||
id="scheduling-mode"
|
||||
title="Scheduling Mode"
|
||||
description="Choose how to configure the Content Blocker schedule"
|
||||
icon="📅"
|
||||
>
|
||||
|
||||
@@ -49,7 +47,6 @@ Choose how to configure the Content Blocker schedule:
|
||||
<ConfigSection
|
||||
id="cron-expression"
|
||||
title="Cron Expression"
|
||||
description="Enter a valid Quartz.NET cron expression to control when the Content Blocker runs"
|
||||
icon="⏲️"
|
||||
>
|
||||
|
||||
@@ -65,7 +62,6 @@ Enter a valid Quartz.NET cron expression to control when the Content Blocker run
|
||||
<ConfigSection
|
||||
id="ignore-private"
|
||||
title="Ignore Private"
|
||||
description="When enabled, private torrents will be skipped from being processed during content blocking"
|
||||
icon="🔒"
|
||||
>
|
||||
|
||||
@@ -76,7 +72,6 @@ When enabled, private torrents will be skipped from being processed during conte
|
||||
<ConfigSection
|
||||
id="delete-private"
|
||||
title="Delete Private"
|
||||
description="When enabled, private torrents that match blocklist criteria will be deleted from the download client"
|
||||
icon="🗑️"
|
||||
>
|
||||
|
||||
@@ -104,7 +99,6 @@ Setting this to true means private torrents will be permanently deleted, potenti
|
||||
<ConfigSection
|
||||
id="enable-blocklist"
|
||||
title="Enable Blocklist"
|
||||
description="When enabled, the Content Blocker will use the configured blocklist to filter content"
|
||||
icon="✅"
|
||||
>
|
||||
|
||||
@@ -115,7 +109,6 @@ When enabled, the Content Blocker will use the configured blocklist to filter co
|
||||
<ConfigSection
|
||||
id="blocklist-path"
|
||||
title="Blocklist Path"
|
||||
description="Path to the blocklist file or URL. This can be a local file path or a remote URL that will be fetched automatically"
|
||||
icon="📂"
|
||||
>
|
||||
|
||||
@@ -139,7 +132,6 @@ regex:<ANY_REGEX> // regex that needs to be marked at the start of the line wi
|
||||
<ConfigSection
|
||||
id="blocklist-type"
|
||||
title="Blocklist Type"
|
||||
description="Controls how the blocklist is interpreted"
|
||||
icon="🎭"
|
||||
>
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ These settings need a download client to be configured.
|
||||
<ConfigSection
|
||||
id="enable-download-cleaner"
|
||||
title="Enable Download Cleaner"
|
||||
description="When enabled, the Download Cleaner will run according to the configured schedule to automatically clean completed downloads from your download client."
|
||||
icon="🔄"
|
||||
>
|
||||
|
||||
@@ -37,7 +36,6 @@ When enabled, the Download Cleaner will run according to the configured schedule
|
||||
<ConfigSection
|
||||
id="scheduling-mode"
|
||||
title="Scheduling Mode"
|
||||
description="Choose how to configure the Download Cleaner schedule"
|
||||
icon="📅"
|
||||
>
|
||||
|
||||
@@ -50,7 +48,6 @@ Choose how to configure the Download Cleaner schedule:
|
||||
<ConfigSection
|
||||
id="cron-expression"
|
||||
title="Cron Expression"
|
||||
description="Enter a valid Quartz.NET cron expression to control when the Download Cleaner runs"
|
||||
icon="⏲️"
|
||||
>
|
||||
|
||||
@@ -79,7 +76,6 @@ Enter a valid Quartz.NET cron expression to control when the Download Cleaner ru
|
||||
<ConfigSection
|
||||
id="delete-private-torrents"
|
||||
title="Delete Private Torrents"
|
||||
description="When enabled, private torrents will be deleted from the download client when they meet the cleanup criteria"
|
||||
icon="🗑️"
|
||||
>
|
||||
|
||||
@@ -115,7 +111,6 @@ Both Max Ratio and Max Seed Time cannot be disabled (-1) at the same time. At le
|
||||
<ConfigSection
|
||||
id="category-name"
|
||||
title="Category Name"
|
||||
description="The name of the download client category to apply these rules to"
|
||||
icon="🏷️"
|
||||
>
|
||||
|
||||
@@ -131,7 +126,6 @@ The name of the download client category to apply these rules to. Must match the
|
||||
<ConfigSection
|
||||
id="max-ratio"
|
||||
title="Max Ratio"
|
||||
description="Maximum ratio to seed before considering the download for removal"
|
||||
icon="📊"
|
||||
>
|
||||
|
||||
@@ -142,7 +136,6 @@ Maximum ratio to seed before considering the download for removal. Set to `-1` t
|
||||
<ConfigSection
|
||||
id="min-seed-time"
|
||||
title="Min Seed Time (hours)"
|
||||
description="Minimum time in hours to seed before removing a download that has reached the max ratio"
|
||||
icon="⏰"
|
||||
>
|
||||
|
||||
@@ -153,7 +146,6 @@ Minimum time in hours to seed before removing a download that has reached the ma
|
||||
<ConfigSection
|
||||
id="max-seed-time"
|
||||
title="Max Seed Time (hours)"
|
||||
description="Maximum time in hours to seed before removing a download regardless of ratio"
|
||||
icon="⏳"
|
||||
>
|
||||
|
||||
@@ -177,7 +169,6 @@ Maximum time in hours to seed before removing a download regardless of ratio. Se
|
||||
<ConfigSection
|
||||
id="enable-unlinked-download-handling"
|
||||
title="Enable Unlinked Download Handling"
|
||||
description="Enable management of downloads that have no hardlinks remaining"
|
||||
icon="🔍"
|
||||
>
|
||||
|
||||
@@ -192,7 +183,6 @@ If you are using Docker, make sure to mount the downloads directory the same way
|
||||
<ConfigSection
|
||||
id="target-category"
|
||||
title="Target Category"
|
||||
description="Category to move unlinked downloads to"
|
||||
icon="🎯"
|
||||
>
|
||||
|
||||
@@ -203,7 +193,6 @@ Category to move unlinked downloads to.
|
||||
<ConfigSection
|
||||
id="use-tag"
|
||||
title="Use Tag"
|
||||
description="When enabled, uses a tag instead of category for marking unlinked downloads (qBittorrent only)"
|
||||
icon="🏷️"
|
||||
>
|
||||
|
||||
@@ -214,7 +203,6 @@ When enabled, uses a tag instead of category for marking unlinked downloads (qBi
|
||||
<ConfigSection
|
||||
id="ignored-root-directory"
|
||||
title="Ignored Root Directory"
|
||||
description="Root directory to ignore when checking for unlinked downloads"
|
||||
icon="📁"
|
||||
>
|
||||
|
||||
@@ -236,7 +224,6 @@ For the example above, the ignored root directory should be set to `/data/downlo
|
||||
<ConfigSection
|
||||
id="unlinked-categories"
|
||||
title="Unlinked Categories"
|
||||
description="Categories to check for unlinked downloads"
|
||||
icon="📋"
|
||||
>
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ Configure download client connections for torrents and usenet. Cleanuparr suppor
|
||||
<ConfigSection
|
||||
id="enable-download-client"
|
||||
title="Enable Download Client"
|
||||
description="Controls whether this download client instance is active and will be used by Cleanuparr for operations."
|
||||
icon="🔄"
|
||||
>
|
||||
|
||||
@@ -37,7 +36,6 @@ Controls whether this download client instance is active and will be used by Cle
|
||||
<ConfigSection
|
||||
id="client-name"
|
||||
title="Client Name"
|
||||
description="A descriptive name to identify this download client instance in the Cleanuparr interface."
|
||||
icon="🏷️"
|
||||
>
|
||||
|
||||
@@ -48,7 +46,6 @@ A descriptive name to identify this download client instance in the Cleanuparr i
|
||||
<ConfigSection
|
||||
id="client-type"
|
||||
title="Client Type"
|
||||
description="Specifies which download client software this configuration connects to."
|
||||
icon="📱"
|
||||
>
|
||||
|
||||
@@ -68,7 +65,6 @@ Specifies which download client software this configuration connects to.
|
||||
<ConfigSection
|
||||
id="client-host"
|
||||
title="Client Host"
|
||||
description="The complete URL to access your download client's web interface."
|
||||
icon="🖥️"
|
||||
>
|
||||
|
||||
@@ -87,7 +83,6 @@ The complete URL to access your download client's web interface.
|
||||
<ConfigSection
|
||||
id="url-base-path"
|
||||
title="URL Base Path"
|
||||
description="URL path prefix if your download client runs behind a reverse proxy with a subpath."
|
||||
icon="📂"
|
||||
>
|
||||
|
||||
@@ -117,7 +112,6 @@ URL path prefix if your download client runs behind a reverse proxy with a subpa
|
||||
<ConfigSection
|
||||
id="username"
|
||||
title="Username"
|
||||
description="Username for download client authentication if required."
|
||||
icon="👤"
|
||||
>
|
||||
|
||||
@@ -128,7 +122,6 @@ Username for download client authentication if required.
|
||||
<ConfigSection
|
||||
id="password"
|
||||
title="Password"
|
||||
description="Password for download client authentication."
|
||||
icon="🔑"
|
||||
>
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ Configure notification services to receive alerts about Cleanuparr operations.
|
||||
<ConfigSection
|
||||
id="notifiarr-api-key"
|
||||
title="Notifiarr API Key"
|
||||
description="Your Notifiarr API key for authentication. This key is obtained from your Notifiarr dashboard."
|
||||
icon="🔑"
|
||||
>
|
||||
|
||||
@@ -44,7 +43,6 @@ Requires Notifiarr's [Passthrough](https://notifiarr.wiki/pages/integrations/pas
|
||||
<ConfigSection
|
||||
id="notifiarr-channel-id"
|
||||
title="Notifiarr Channel ID"
|
||||
description="The Discord channel ID where notifications will be sent. This determines the destination for your alerts."
|
||||
icon="💬"
|
||||
>
|
||||
|
||||
@@ -68,7 +66,6 @@ The Discord channel ID where notifications will be sent. This determines the des
|
||||
<ConfigSection
|
||||
id="apprise-url"
|
||||
title="Apprise URL"
|
||||
description="The Apprise server URL where notification requests will be sent."
|
||||
icon="🌐"
|
||||
>
|
||||
|
||||
@@ -79,7 +76,6 @@ The Apprise server URL where notification requests will be sent.
|
||||
<ConfigSection
|
||||
id="apprise-key"
|
||||
title="Apprise Key"
|
||||
description="The key that identifies your Apprise configuration. This corresponds to a configuration defined in your Apprise server."
|
||||
icon="🔐"
|
||||
>
|
||||
|
||||
@@ -99,7 +95,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-failed-import-strike"
|
||||
title="Failed Import Strike"
|
||||
description="Triggered When: A download receives a strike for failed import."
|
||||
icon="❌"
|
||||
>
|
||||
|
||||
@@ -110,7 +105,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-stalled-strike"
|
||||
title="Stalled Strike"
|
||||
description="Triggered When: A download receives a strike for being stalled."
|
||||
icon="⏸️"
|
||||
>
|
||||
|
||||
@@ -121,7 +115,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-slow-strike"
|
||||
title="Slow Strike"
|
||||
description="Triggered When: A download receives a strike for slow speed."
|
||||
icon="🐌"
|
||||
>
|
||||
|
||||
@@ -132,7 +125,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-queue-item-deleted"
|
||||
title="Queue Item Deleted"
|
||||
description="Triggered When: A download is removed from the queue."
|
||||
icon="🗑️"
|
||||
>
|
||||
|
||||
@@ -143,7 +135,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-download-cleaned"
|
||||
title="Download Cleaned"
|
||||
description="Triggered When: Download Cleaner removes completed downloads."
|
||||
icon="🧽"
|
||||
>
|
||||
|
||||
@@ -154,7 +145,6 @@ The key that identifies your Apprise configuration. This corresponds to a config
|
||||
<ConfigSection
|
||||
id="event-category-changed"
|
||||
title="Category Changed"
|
||||
description="Triggered When: Download Cleaner changes a download's category."
|
||||
icon="🏷️"
|
||||
>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user