The Google Form results are out!
Thank you to everyone who participated and shared your thoughts on Swaparr. The results are available at the bottom of this readme.
Swaparr is evolving into a web app to enhance management and provide more insights on stalled downloads. The terminal-based version will still be available but will no longer be supported once the web version has been marked as stable.
Radarr, Sonarr and the other Starrs currently lack a built-in mechanism to handle stalled downloads, this project aims to solve that.
Swaparr is inspired by a Reddit thread "I wrote a script that repl.." from Douglas96.
If Swaparr has been helpful to you and you appreciate the power of open-source software, please consider giving this repository a star. Your gesture will greatly support our efforts and help others discover Swaparr!
Swaparr quietly operates in the background, offering full customization options and clear visibility through console logs. Its primary function is to address the issue of stalled downloads in starr instances.
- Automatic Detection: Swaparr scans through all active downloads in your starr instances every 10 minutes (adjustable) to identify potential slowdowns.
- Strike System: Identified downloads are given a strike, and this evaluation cycle repeats periodically. If a download accumulates the maximum allowed strikes, Swaparr automatically removes it from your instance.
- Customization: Swaparr offers customization options to fine-tune striking behaviour.
Warning
Swaparr is still in beta, things might change before reaching version 1.0.0
Docker and it's compose plugin are required, below is a matrix on how to install both for your system:
Operating System | Official Instructions |
---|---|
Linux | docs.docker.com/../linux-install |
MacOS | docs.docker.com/.../mac-install |
Windows | docs.docker.com/.../windows-install |
Start with the provided compose file as a foundation, and customize it by excluding or adjusting any services.
version: '3'
services:
radarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-radarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:7878 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Radarr API Key (Required)
- PLATFORM=radarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
# -- (Optional)
sonarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-sonarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:8989 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Sonarr API Key (Required)
- PLATFORM=sonarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
🚩 Extended experimental support: Lidarr, Readarr and Whisparr
version: '3'
services:
radarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-radarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:7878 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Radarr API Key (Required)
- PLATFORM=radarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
# -- (Optional)
sonarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-sonarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:8989 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Sonarr API Key (Required)
- PLATFORM=sonarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
# -- (Optional)
lidarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-lidarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:8989 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Lidarr API Key (Required)
- PLATFORM=lidarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
# -- (Optional)
readarr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-readarr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:8989 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Readarr API Key (Required)
- PLATFORM=readarr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
# -- (Optional)
whisparr:
image: ghcr.io/thijmengthn/swaparr:latest
container_name: swaparr-whisparr
restart: unless-stopped
environment:
- BASEURL=http://127.0.0.1:8989 # IP or FQDN (Required)
- APIKEY=7f3a8..cbc07 # Whisparr API Key (Required)
- PLATFORM=whisparr # "radarr", "sonarr".. (Optional) default: radarr
- MAX_STRIKES=3 # Positive number (Optional) default: 3
- SCAN_INTERVAL=10m # 1d, 6h, 30m, etc.. (Optional) default: 10m
- MAX_DOWNLOAD_TIME=2h # 1d, 6h, 30m, etc.. (Optional) default: 2h
- IGNORE_ABOVE_SIZE=25GB # 1TB, 1GB, 1MB, etc.. (Optional) default: 25GB
- REMOVE_FROM_CLIENT=true # Boolean (Optional) default: true
- DRY_RUN=false # Boolean (Optional) default: false
To start Swaparr, run the following command:
docker compose up -d
You can monitor Swaparr's activities and track the processing of downloads by executing the following command. Omit the <container_name>
parameter to view logs for all platforms:
docker compose logs <container_name>
Instructions: Stop or Update Swaparr
To shutdown Swaparr, run the following command:
docker compose down
Updating Swaparr is a breeze, pull the latest images and restart the service:
docker compose pull
docker compose down
docker compose up -d
A brief rundown to shed light on a couple of things for you:
Environment Variables
Name | Default | Description |
---|---|---|
BASEURL | http://127.0.0.1:7878 |
The URL of a radarr, sonarr or other starr instance. |
APIKEY | 7f3a8..cbc07 |
The API key of a radarr, sonarr or other starr instance. |
PLATFORM | radarr |
Indicates the type of starr platform, either radarr , sonarr , lidarr , readarr or whisparr . |
MAX_STRIKES | 3 |
Maximum number of strikes a download can accumulate before it is removed. |
SCAN_INTERVAL | 10m |
How often Swaparr checks for stalled downloads. |
MAX_DOWNLOAD_TIME | 2h |
Maximum allowed download time before it's considered stalled. |
IGNORE_ABOVE_SIZE | 25GB |
Files larger than this size will be ignored and not monitored. |
REMOVE_FROM_CLIENT | true |
Remove from both queue and download client (default) OR false only the queue of a starr instance. |
DRY_RUN | false |
Sandbox mode; try Swaparr without it performing destructive actions on your instances. |
Status-Types Explained
Status | Description |
---|---|
Normal |
Download is proceeding as expected; no issues detected. |
Striked |
Download flagged as slow or stalled; may be removed if it continues to accumulate strikes. |
Removed |
Download has been attempted to be removed from the starr instance. |
Ignored |
Download is not monitored because it falls outside the set thresholds (e.g., size or time limits). |
Queued |
Download is in the queue within the download client waiting to start; will not be striked. |
Whether you need help, want to pitch in, or found a bug that needs fixing, just open an issue. We're all ears and ready to collaborate with you!
We're excited to see that many of you agree that a web interface is a great choice! It will simplify checking the current status of downloads and configuring settings in a more user-friendly way. With the addition of numerous environment variables, managing Swaparr will become much easier.
If you have any concerns or believe this change might not be beneficial, please open a new discussion to share your thoughts and discuss it further.