-
Notifications
You must be signed in to change notification settings - Fork 0
Home
TorrentScript is a qBittorrent post-processing script that handles subtitle extraction, cleanup, and import of media into Radarr, Medusa, or Sonarr.
It ensures that all media files are properly processed before being imported, preventing incomplete or unprocessed files from being added to your library.
β
Automated Post-Processing: Handles extraction, cleanup, and import after a torrent completes.
β
Subtitle Management: Extracts, cleans, renames, and downloads missing subtitles from OpenSubtitles.
β
Flexible Import Handling: Supports Medusa, Radarr, and Sonarr for importing TV shows and movies.
β
RemotePath Support: Ensures correct file paths are used when running the script from a different machine.
β
Email Notifications: Get alerts about processing results.
β
Logging & Error Handling: Keeps detailed logs for debugging.
- Torrent completes in qBittorrent
-
Script is triggered automatically
- Extracts files (if necessary)
- Processes subtitles
- Moves files to the correct folder
- Sends the correct import path to Medusa, Radarr, or Sonarr
- Media is imported into your library π
-
Install Required Tools
-
Configure
config.json
- Define paths, API keys, and import settings
- See Configuration file explained for full details
-
Set Up qBittorrent
- Add post-processing script
- Ensure torrents are stored in unique folders
- Set Remote Path Mapping if needed
-
Run the Script
- The script will automatically process new torrents when qBittorrent completes a download
TorrentScript supports importing files into the following applications:
Application | Purpose | API Used |
---|---|---|
Medusa | TV Show Management | /api |
Radarr | Movie Management | /api/v3 |
Sonarr | TV Show Management | /api/v3 |
π‘ You can choose Medusa or Sonarr for TV show imports using the "ImportPrograms"
setting in config.json
.
Q: Does this script work on Linux?
A: This script is written in PowerShell and is designed for Windows Server. However, you may be able to adapt it for Linux using PowerShell Core.
Q: Can I use this script if my torrent client runs on another machine?
A: Yes! The RemotePath
setting ensures that Medusa, Radarr, and Sonarr always receive the correct file path, even when running the script from a different computer.
Q: What happens if the script encounters an error?
A: Errors are logged in the LogArchivePath
directory, and an email notification (if configured) will be sent.
Q: Can I use both Medusa and Sonarr at the same time?
A: No, you must choose one for TV shows using "ImportPrograms": { "TV": "Sonarr" }
or "Medusa"
.