uncapped1599 / discord_qbittorrent

A simple bash script for creating a styled Discord notification from qBittorrent
GNU General Public License v3.0
15 stars 2 forks source link

Discord notification script for qBittorrent

This is a simple bash script for sending notifications to a Discord webhook for completed downloads from qBittorrent. Useful for those already using radarr, sonarr, readarr for downloading.

Features

Usage

  1. Create a Discord webhook URL - instructions
  2. Download the bash script and make it available to qBittorrent. For docker instances, ensure it is placed in a mounted folder. Make it executable with chmod +X /path/to/script/discord_qbit_notification.sh.
  3. Input your Discord webhook URL at the top of the script.
  4. Adapt the categories to align with your qBittorrent instance. For example, besides the usual sonarr, radarr categories, I have watch folders for manually adding torrents which I like to use for notifications.
  5. You can test the script by running it in your terminal with some test parameters. For example: bash /path/to/script/discord_qbit_notification.sh TestName 9999922 12 tracker.com radarr savepath. If successful you should see confirmation in the terminal along with a discord notification.
  6. Add the following to 'run external program on torrent completion' under your qBittorrent settings: /path/to/script/discord_qbit_notification.sh "%N" "%Z" "%C" "%T" "%L" "%D" Note: The order of the parameters is important as they are captured accordingly in the script, make sure to edit accordingly if adapting the script for different parameters.
  7. Done!

Tip: adding categories to watched folders in qBittorrent (docker)

If you're using qBittorrent through linuxserver's container, the webUI doesn't surface a way to add categories to watched folders. To do this, you have to edit the watched_folders.json file located in the containers config folder. The path will be something like containerConfig/qbittorrent/qBittorrent/watched_folders.json. An example is provided in the repo.