Swaparr Documentation

Swaparr is a stalled download cleaning utility for the *arr applications built into Huntarr. It provides basic features and easier configuration when compared to Cleanuperr.
Overview
What Problem Does Swaparr Solve?
While your *arr applications are excellent at managing media downloads, they can struggle with:
- Stalled Downloads: Downloads that appear to be active but haven't made progress
- Failed Downloads: Downloads that have failed but remain in the queue
- Stuck Imports: Downloads that completed but aren't being imported properly
- Queue Clogging: Problematic downloads preventing new ones from starting
- Manual Cleanup: Having to manually remove problematic downloads regularly
How Swaparr Helps
Swaparr automates the cleanup process by:
- Monitoring Download Progress: Continuously checks download status and progress
- Smart Detection: Identifies truly stalled downloads vs. slow but progressing ones
- Automatic Removal: Removes problematic downloads automatically
- Strike System: Uses a configurable strike system before taking action
- Safe Operation: Includes dry-run mode and comprehensive logging
Configuration
The following settings correspond to the options you see in the Swaparr Configuration panel:
Enable Swaparr
What it does: Master switch to enable or disable automatic removal of stalled downloads.
When to use: Turn this on after configuring your other settings. You can disable this temporarily to stop Swaparr without losing your configuration.
Max Strikes
What it does: Number of times a download must be flagged as problematic before being removed (default: 3).
How it works: Each monitoring cycle, Swaparr checks downloads. If a download meets the "stalled" criteria, it gets a strike. Once it reaches your max strikes setting, it gets removed.
Recommended values:
- 1-2 strikes: Aggressive cleanup, faster response (for users with reliable indexers)
- 3-4 strikes: Balanced approach (recommended for most users)
- 5+ strikes: Conservative, gives downloads more time (for slower connections or unreliable indexers)
Max Download Time
What it does: Maximum time before considering a download stalled (examples: 2h, 120m, 7200s).
How it works: If a download has been running longer than this time without making progress, it will receive a strike.
Recommended values:
- 1-2 hours: For fast connections and reliable trackers
- 2-4 hours: Balanced setting for most users
- 4+ hours: For slower connections or private trackers with limited seeds
Ignore Above Size
What it does: Ignore downloads larger than this size (examples: 25GB, 10GB, 5000MB).
Why this matters: Large files naturally take longer to download. This prevents Swaparr from removing legitimate large downloads that are progressing slowly.
Recommended values:
- TV Shows: 10-25GB (season packs, 4K episodes)
- Movies: 25-50GB (4K movies, remuxes)
- Music: 5-10GB (FLAC albums, discographies)
Remove from Client
What it does: Also remove downloads from the download client (recommended: enabled).
When enabled: Removes the download from both the *arr application and your download client (qBittorrent, Deluge, etc.)
When disabled: Only removes from the *arr application, but leaves the download in your client
Recommendation: Keep this enabled for complete cleanup. Only disable if you want to manually review removed downloads in your client.
Dry Run Mode
What it does: Test mode - logs what would be removed without actually removing anything.
Perfect for:
- Testing your configuration before going live
- Seeing what Swaparr would remove with your current settings
- Troubleshooting why certain downloads aren't being removed
- Understanding Swaparr's behavior before trusting it with your downloads
Recommendation: Enable this first, run for a few cycles, check the logs, then disable once you're confident in your settings.
Sleep Duration
What it does: Time to wait between Swaparr processing cycles (default: 900 seconds / 15 minutes).
After 0-15 minutes (whenever Swaparr runs) the download is monitored by Swaparr. 15 minutes later there is no progress: strike 1; 15 minutes later: strike 2; further 15 minutes: strike 3 and the download is removed.
In total it takes 45-60 minutes (depending on the first run of Swaparr) to remove bad downloads.
Note: Bad downloads as specified by Swaparr's security features are removed immediately with the next scan.
How it affects performance:
- Shorter intervals (5-10 min): Faster response to stalled downloads, more system load
- Medium intervals (15-30 min): Good balance, recommended for most users
- Longer intervals (45+ min): Less system load, slower response to issues
Consider your setup: If you have many active downloads, shorter intervals help. If you have a slower system or fewer downloads, longer intervals are fine.
Security Features
Swaparr includes advanced security features to protect your system from malicious downloads and suspicious content by analyzing download names and titles. Detection is based on filename patterns, not file contents.
Malicious File Detection
What it does: Automatically detect and immediately remove downloads with malicious file types.
How it works: Scans download names for dangerous file extensions and suspicious patterns. Unlike the strike system, malicious content is removed immediately without warnings.
When to enable: Highly recommended for all users, especially those using public trackers where malicious content is more common.
Malicious File Extensions
What it does: File extensions to consider malicious and block immediately.
Default blocked extensions:
- Executable files: .exe, .bat, .cmd, .com, .scr, .pif, .msi
- Script files: .vbs, .js, .jse, .wsf, .wsh
- Archive formats: .zipx, .arj, .ace, .001, .rar, .zip (suspicious variants and password-protected archives)
- Disc image files: .iso, .mdf, .vob (often used to distribute malware)
- Link files: .lnk (Windows shortcuts)
- Java archives: .jar (can contain malware)
Customization: Use the tag input system to add or remove extensions. Type the extension (with or without the dot) and press Enter or click the + button.
Suspicious Patterns
What it does: Filename patterns that indicate potentially malicious or unwanted content.
Default blocked patterns:
- Common malware indicators: keygen, crack, patch.exe, activator
- Suspicious files: password.txt, readme.txt, install.exe, setup.exe
Examples of what gets blocked:
- "Movie.Name.2024.1080p.KEYGEN.mkv" - Contains "keygen"
- "Software.Name.v1.2.Crack.Only.zip" - Contains "crack"
- "Game.Install.Password.txt.exe" - Contains suspicious pattern
Customization: Add patterns that are common in your region or specific to content you want to avoid.
Age-Based Cleanup
Age-based cleanup automatically removes downloads that have been stuck for too long, regardless of strike count. This provides a safety net for downloads that might slip through the normal strike system.
Enable Age-Based Removal
What it does: Remove downloads that have been stuck longer than the specified age limit.
How it works: Tracks when Swaparr first noticed each download and removes it after the specified number of days, even if it hasn't reached the maximum strike count.
When to use: Enable this to prevent downloads from sitting in queues indefinitely. Particularly useful for handling edge cases where the normal strike system might not catch problematic downloads.
Maximum Age (Days)
What it does: Remove downloads older than this many days (default: 7 days).
Recommended values:
- 3-5 days: Aggressive cleanup, good for users with reliable download sources
- 7-10 days: Balanced approach, gives enough time for slow downloads (recommended)
- 14+ days: Conservative, for users with very slow connections or unreliable trackers
Consider your setup: Private trackers with limited seeders might need longer age limits. Public trackers with many alternatives can use shorter limits.
Quality-Based Filtering
Quality-based filtering automatically removes downloads with poor or undesirable quality indicators in their names. This helps maintain high standards for your media library.
Enable Quality-Based Filtering
What it does: Automatically remove downloads with blocked quality patterns in their names.
How it works: Scans download names for quality indicators that suggest poor viewing/listening experience. Like malicious file detection, quality-blocked content is removed immediately without strikes.
When to use: Enable if you want to maintain high quality standards and automatically reject low-quality releases.
Blocked Quality Patterns
What it does: Quality patterns to block based on their indicators in filenames.
Default blocked qualities:
- Camera recordings: cam, camrip, hdcam - Recorded in theaters with handheld cameras
- Telesyncs: ts, telesync, tc, telecine - Audio/video from different sources, poor sync
- Pre-retail: r6, dvdscr, dvdscreener - Pre-release screeners, often watermarked
- Workprints: workprint, wp - Unfinished cuts, missing effects or audio
Examples of what gets blocked:
- "Movie.Name.2024.CAM.XviD.avi" - CAM recording
- "Show.S01E01.TS.HDTV.x264.mkv" - Telesync quality
- "Movie.2024.R6.DVDScr.XviD.avi" - DVD screener
- "New.Movie.2024.WORKPRINT.x264.mp4" - Work print
Quality standards comparison:
Quality Type | Video Quality | Audio Quality | Recommendation |
---|---|---|---|
CAM/TS | Very Poor | Very Poor | Block (Default) |
DVDScr/R6 | Poor | Fair | Block (Default) |
HDTV/WEB-DL | Good | Good | Allow |
BluRay/Remux | Excellent | Excellent | Allow |
Customization: Use the tag input system to add quality patterns specific to your preferences. For example, you might want to block "720p" if you only accept 1080p or higher.
*arr Instance Setup
Swaparr uses your existing *arr configurations from Huntarr. In the Swaparr configuration, you'll see checkboxes for each of your configured instances:
Application | What Gets Monitored | Best Practices |
---|---|---|
Sonarr Instances | TV show download queues | Enable for instances with frequent stalled episodes |
Radarr Instances | Movie download queues | Especially useful for instances downloading large 4K movies |
Lidarr Instances | Music download queues | Enable if you frequently download FLAC or large music collections |
Readarr Instances | Book/audiobook download queues | Useful for large audiobook files that might stall |
Whisparr Instances | Adult content download queues | Enable based on your monitoring needs |
How Swaparr Works
Monitoring Cycle
Every sleep duration interval, Swaparr performs these steps:
- Instance Discovery: Finds your enabled *arr instances
- Queue Analysis: Gets current download queues from each instance
- Progress Check: Compares current state with previous cycles
- Strike Assessment: Awards strikes to downloads meeting removal criteria
- Action Execution: Removes downloads that exceed max strikes
- Statistics Update: Updates persistent statistics and logs results
When Downloads Get Strikes
A download receives a strike when it meets ALL these conditions:
- Has been downloading longer than your Max Download Time
- Is smaller than your Ignore Above Size setting
- Shows no progress since the last monitoring cycle
- Is not in a "completed" or "seeding" state
Statistics Tracking
Swaparr tracks comprehensive statistics visible on your home dashboard:
Statistic | What It Counts | When It Increases |
---|---|---|
Processed | Total downloads analyzed | Every download checked during monitoring cycles |
Strikes | Strikes issued to problematic downloads | When a download meets strike criteria |
Removals | Downloads removed via strike system | When a download reaches max strikes and gets removed |
Malicious Removals | Downloads removed for malicious content | When malicious file detection blocks a download |
Quality Removals | Downloads removed for poor quality | When quality-based filtering blocks a download |
Age Removals | Downloads removed for being too old | When age-based cleanup removes stale downloads |
Ignored | Downloads skipped due to rules | When downloads are larger than ignore size or already completed |
Best Practices
Getting Started
- Start with Dry Run: Enable dry run mode and monitor logs for 24-48 hours
- Conservative Settings: Use 4-5 max strikes and longer download times initially
- Monitor Statistics: Watch the dashboard stats to understand Swaparr's impact
- Gradual Adjustment: Fine-tune settings based on your specific download patterns
- Check Logs: Review logs regularly to ensure expected behavior
Configuration Tips
- Match Your Connection: Adjust max download time based on your internet speed
- Consider Your Trackers: Private trackers may need more conservative settings
- Instance Selection: Only monitor instances that commonly have stalled downloads
- Size Limits: Set ignore above size to protect large, slow downloads
- Peak Hours: Consider longer sleep duration during peak internet usage
Example Configurations
Aggressive Setup (Fast Connection, Reliable Trackers)
- Max Strikes: 2
- Max Download Time: 1h
- Ignore Above Size: 50GB
- Sleep Duration: 600 seconds (10 minutes)
- Remove from Client: Enabled
- Malicious File Detection: Enabled
- Age-Based Removal: Enabled (5 days)
- Quality-Based Filtering: Enabled (default patterns)
Balanced Setup (Most Users)
- Max Strikes: 3
- Max Download Time: 2h
- Ignore Above Size: 25GB
- Sleep Duration: 900 seconds (15 minutes)
- Remove from Client: Enabled
- Malicious File Detection: Enabled
- Age-Based Removal: Enabled (7 days)
- Quality-Based Filtering: Optional (based on preferences)
Conservative Setup (Slower Connection, Private Trackers)
- Max Strikes: 5
- Max Download Time: 4h
- Ignore Above Size: 15GB
- Sleep Duration: 1800 seconds (30 minutes)
- Remove from Client: Enabled
- Malicious File Detection: Enabled
- Age-Based Removal: Enabled (14 days)
- Quality-Based Filtering: Disabled (manual quality control)
Troubleshooting
Common Issues
No Downloads Detected
If Swaparr reports no downloads to monitor:
- Verify your *arr instances are properly configured in Huntarr Settings
- Check that you've enabled the correct instances in Swaparr configuration
- Ensure the selected instances have active downloads in their queues
- Test API connectivity using the *arr instance connection tests
- Check Huntarr logs for Swaparr connection errors
Downloads Not Being Removed
If problematic downloads aren't being removed:
- Verify Dry Run Mode is disabled
- Check if downloads exceed your Ignore Above Size setting
- Ensure downloads have been stalled longer than Max Download Time
- Confirm downloads have accumulated enough strikes (check logs)
- Verify Enable Swaparr is turned on
- Check download client API permissions
Too Aggressive Removal
If Swaparr is removing downloads too quickly:
- Increase Max Strikes to give downloads more chances
- Extend Max Download Time for slower downloads
- Increase Ignore Above Size to protect larger files
- Extend Sleep Duration to reduce monitoring frequency
- Consider your network conditions and typical download speeds
Performance Issues
If Swaparr is impacting system performance:
- Increase Sleep Duration to reduce processing frequency
- Disable monitoring for instances with very large queues
- Check if your *arr applications are responding slowly
- Monitor system resource usage during Swaparr cycles
Logging and Debugging
Swaparr provides detailed logging to help diagnose issues. Look for these log entries:
- Cycle Start/End: Beginning and completion of each monitoring cycle
- Instance Processing: Which *arr instances are being checked
- Strike Assignment: When downloads receive strikes and why
- Removal Actions: Successful or failed removal attempts
- Statistics Updates: Changes to tracked statistics
- API Errors: Connection issues with *arr applications or download clients