Configuration file explained - Rouzax/TorrentScript GitHub Wiki
Configuration Guide
Overview
This page explains the settings in the config.json
file for TorrentScript.
Each configuration option controls how the script processes torrents, interacts with external tools, and imports media into Medusa, Radarr, and Sonarr.
Configuration Entries
General Settings
Key | Description |
---|---|
DateFormat |
Defines the date format used in logs and filenames. Example: "yyyy.MM.dd_HH.mm.ss" |
ProcessPath |
Temporary folder where files are unpacked and processed. Example: "C:\\TEMP\\Torrent\\PROCD" |
LogArchivePath |
Directory where logs are stored. Example: "C:\\TEMP\\Torrent\\PROCD\\_LOGS" |
DownloadRootPath |
Root folder where torrents are downloaded. Example: "C:\\TEMP\\Torrent\\Downloads" |
Label Configuration
Key | Description |
---|---|
Label.TV |
Label used for TV show torrents. Example: "TV" |
Label.Movie |
Label used for movie torrents. Example: "Movie" |
External Tools Configuration
These paths specify where external tools are installed.
Key | Description |
---|---|
WinRarPath |
Path to rar.exe for extracting archives. Example: "C:\\Program Files\\WinRAR\\rar.exe" |
MKVMergePath |
Path to mkvmerge.exe for merging MKV files. Example: "C:\\Program Files\\MKVToolNix\\mkvmerge.exe" |
MKVExtractPath |
Path to mkvextract.exe for extracting subtitles from MKV files. Example: "C:\\Program Files\\MKVToolNix\\mkvextract.exe" |
SubtitleEditPath |
Path to Subtitle Edit.exe for subtitle processing. Example: "C:\\GitHub\\SubtitleEdit\\SubtitleEdit.exe" |
Email Notifications
This section configures email notifications for processing results.
Key | Description |
---|---|
To |
Email address to send notifications to. |
From |
Sender email address. |
FromName |
Display name for sender. |
SMTPserver |
SMTP server for sending emails. |
SMTPport |
SMTP port (typically 465 for SSL). |
SMTPuser |
SMTP authentication username. |
SMTPpass |
SMTP authentication password. |
Example:
"Mail": {
"To": "[email protected]",
"From": "[email protected]",
"FromName": "TorrentScript",
"SMTPserver": "smtp.mail.com",
"SMTPport": "465",
"SMTPuser": "[email protected]",
"SMTPpass": "Password123"
}
Subtitle Processing Configuration
Configures subtitle filtering and OpenSubtitles.com integration.
Key | Description |
---|---|
OpenSub.User |
OpenSubtitles username. |
OpenSub.Password |
OpenSubtitles password. |
OpenSub.API |
OpenSubtitles API key. |
OpenSub.hearing_impaired |
Controls whether to include or exclude hearing-impaired subtitles ("include" , "exclude" ). |
OpenSub.foreign_parts_only |
Controls foreign-only subtitles ("include" , "exclude" ). |
OpenSub.machine_translated |
Controls machine-translated subtitles ("include" , "exclude" ). |
OpenSub.ai_translated |
Controls AI-translated subtitles ("include" , "exclude" ). |
Language Configuration
Key | Description |
---|---|
WantedLanguages |
List of ISO 639-2 (3-letter) language codes for desired subtitles. |
SubtitleNamesToRemove |
Removes specific subtitles by name (e.g., "Forced" ). |
Example:
"WantedLanguages": [
"eng",
"dut"
],
"SubtitleNamesToRemove": [
"Forced"
]
qBittorrent Configuration
Configures how the script connects to qBittorrent for download management.
Key | Description |
---|---|
Host |
qBittorrent WebUI host (default: "http://localhost" ). |
Port |
qBittorrent WebUI port (default: "8080" ). |
User |
qBittorrent WebUI username. |
Password |
qBittorrent WebUI password. |
Example:
"qBittorrent": {
"Host": "http://localhost",
"Port": "8080",
"User": "admin",
"Password": "adminadmin"
}
Media Management Configuration
This section configures how the script interacts with media management applications (Medusa, Radarr, Sonarr) for importing processed files.
ImportPrograms
Key | Description |
---|---|
ImportPrograms |
Determines which application should import TV shows. For example, "TV": "Sonarr" directs the script to use Sonarr for TV show imports rather than Medusa. |
Example:
"ImportPrograms": {
"TV": "Sonarr"
}
Medusa Configuration
Key | Description |
---|---|
Host |
Medusa API host (default: "localhost" ). |
Port |
Medusa API port (default: "8081" ). |
APIKey |
Medusa API key. |
TimeOutMinutes |
Timeout setting (default: "15" ). |
RemotePath |
Mapped path to the media files for Medusa. |
Example:
"Medusa": {
"Host": "localhost",
"Port": "8081",
"APIKey": "YOUR_API_KEY",
"TimeOutMinutes": "15",
"RemotePath": "C:\\TEMP\\Torrent\\Medusa"
}
Radarr Configuration
Key | Description |
---|---|
Host |
Radarr API host (default: "localhost" ). |
Port |
Radarr API port (default: "7878" ). |
APIKey |
Radarr API key. |
TimeOutMinutes |
Timeout setting (default: "15" ). |
RemotePath |
Mapped path to the media files for Radarr. |
Example:
"Radarr": {
"Host": "localhost",
"Port": "7878",
"APIKey": "YOUR_API_KEY",
"TimeOutMinutes": "15",
"RemotePath": "C:\\TEMP\\Torrent\\Radarr"
}
Sonarr Configuration
Key | Description |
---|---|
Host |
Sonarr API host (default: "localhost" ). |
Port |
Sonarr API port (default: "8989" ). |
APIKey |
Sonarr API key. |
TimeOutMinutes |
Timeout setting (default: "15" ). |
RemotePath |
Mapped path to the media files for Sonarr. |
Example:
"Sonarr": {
"Host": "localhost",
"Port": "8989",
"APIKey": "YOUR_API_KEY",
"TimeOutMinutes": "15",
"RemotePath": "C:\\TEMP\\Torrent\\Sonarr"
}
RemotePath
Understanding The RemotePath
setting ensures that Medusa, Radarr, and Sonarr receive the correct file paths, even when the script is executed from a different machine than where these applications are running.
Example Use Case
- If a jumphost triggers the script but Medusa, Radarr, or Sonarr run on another machine, they might need a different file path.
- The script will pass the correct path via
RemotePath
, ensuring that media is imported correctly.
🔹 This is NOT the same as "Remote Path Mapping" in Radarr/Sonarr settings.
RemotePath
inconfig.json
→ Used by this script to pass the correct paths.- Remote Path Mapping in Radarr/Sonarr → Configured in the application UI.