❓ What is this? Jelly Torrent Throttle is a lightweight Python webhook service that listens to Jellyfin playback events and temporarily throttles qBittorrent global speeds during playback (restoring them on pause/stop).
❓ How to use it?
❓ What did I use?
- Jellyfin
- Webhooks for Jellyfin
- qBittorent with WebUI 5.0+
- Python 3.13+ or Docker with docker-compose
- Install Webhooks for Jellyfin:
- Add this link to
Repositoriesin Jellyfin settings - Restart your Jellyfin instance
- Install plugin called
Webhooks - Restart your Jellyfin instance
- Add this link to
- Copy
docker-compose.ymlfile to directory of your choice - Edit it according to environment variables
- Run container -
docker-compose up -d - Grab the
IP:PORTof your container - Create new webhook in Webhooks for Jellyfin plugin:
- URL:
http://IP:PORT - Payload format:
Default - Listen to events only for:
All users - Events:
Play,Pause,Resume,Stop
- URL:
- Install Webhooks for Jellyfin:
- Add this link to
Repositoriesin Jellyfin settings - Restart your Jellyfin instance
- Install plugin called
Webhooks - Restart your Jellyfin instance
- Add this link to
- Copy
JellyTorrentThrottle.py,.env.exampleandrequirements.txtto directory of your choice - Change name of
.env.exampleto.envand edit it according to environment variables - Install requirements -
python -m pip install -r requirements.txt - Run script -
python JellyTorrentThrottle.py - Grab the
IP:PORT - Create new webhook in Webhooks for Jellyfin plugin:
- URL:
http://IP:PORT - Payload format:
Default - Listen to events only for:
All users - Events:
Play,Pause,Resume,Stop
- URL:
-
WEBHOOK_HOST- IP address or hostname to bind the webhook listener to (default:0.0.0.0) -
WEBHOOK_PORT- Port for the webhook listener (default:18080) -
QBITTORRENT_URL- Base URL of qBittorrent WebUI (e.g.http://localhost:8080) -
QBITTORRENT_USERNAME- qBittorrent WebUI username -
QBITTORRENT_PASSWORD- qBittorrent WebUI password -
SPEED_MODE- Throttle mode:alternative(use qBittorrent alt-speed limits) orcustom(use the custom limits below) -
THROTTLE_DOWNLOAD_LIMIT- Download limit to apply when throttling (KiB/s, only used withSPEED_MODE=custom) -
THROTTLE_UPLOAD_LIMIT- Upload limit to apply when throttling (KiB/s, only used withSPEED_MODE=custom) -
LOG_LEVEL- Logging level (DEBUG,INFO,WARNING,ERROR, default:INFO) -
LOG_FILE- Optional path to a rotating log file (if set, logs will also be written to this file)
- 🎛️ Listens to Jellyfin playback webhooks (Play / Resume / Pause / Stop)
- 🐢 Temporarily throttles qBittorrent global speeds during playback and restores them on pause/stop
- ⚙️ Supports
alternative(qBittorrent alt-speed) andcustomthrottle modes - 👥 Safely handles multiple simultaneous playback sessions
- 🌐 Configurable via a
.envfile or viadocker-compose.yml(qBittorrent credentials, throttle limits, host/port) - 🩺 Exposes a
/healthendpoint and provides clean console logging - 🐳 Runnable via Docker Compose or directly with Python
- 🔐 Uses qBittorrent WebUI authentication for API actions; no database required

