Skip to content

A script that interacts with the Plex server, qBittorrent, and an Unraid server to manage the speed of qBittorrent downloads based on the number of active streams on Plex and the status of a parity check operation on the Unraid server.

Notifications You must be signed in to change notification settings

pairofcrocs/qbit-unraid-slowdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

qBit/unRaid Slowdown

This script is designed to automate the management of a Plex media server, qBittorrent client, and an Unraid server. It checks the number of active streams on the Plex server and adjusts the speed mode of the qBittorrent client accordingly. It also provides functionality to pause or resume a parity check operation on the Unraid server as well as pausing the mover and resuming when there are no streams (only if the mover was interrupted).

Prerequisites

Before using this script, make sure you have the following:

  • 'Parity Check Tuning' plugin by Dave Walker (itimpi)
  • Tautulli docker container by JonnyWong16
  • The required Python packages installed in the Tautulli container: requests, re, qbittorrentapi, paramiko python-dotenv. (create a user script that runs at the start of the array with the following: docker exec tautulli pip install requests qbittorrent-api paramiko python-dotenv)

Setup

  1. Clone or download the script to your script folder as /appdata/Tautulli/scripts/plex-qbit-unraid.py
  2. Clone or download the .env file to your script folder as /appdata/Tautulli/scripts/.env
  3. Replace the values (REPLACEME) in the .env file with login details for your set up.
  4. Make sure you have Use increments for manual Parity Check and Use increments for scheduled Parity Check set to YES in the 'Parity Check Tuning' plugin. You can also set Use increments for automatic Parity Check to yes, but it's not recommenced. parity check settings
  5. Set up a new Script in Tautulli by going to Settings > Notification Agents > Add a new notification agent > Script. On the Configuration tab. Add your scripts folder /config/scripts and your script file './plex-qbit-unraid.py. Then on the Triggers tab, add Playback Start and Playback Stop as your only triggers and save. tautulli settings
  6. Adjust the limits of the qBittorrent by going to Tools > Speed then setting the Alternate Rate Limits to your desired speed and save. The speed is up to you and what your setup can handle. qBittorrent settings.

After that, you should be good to go!

Now, every time something is started or stopped in Plex, the script will check if anyone is watching and slowdown qBittorrent/pause a parity check or speedup qBittorrent, resume parity check, and resume the mover if it was interrupted. This will only happen when there are 0 people steaming. You can check the Tautulli logs to see what the script is doing.

About

A script that interacts with the Plex server, qBittorrent, and an Unraid server to manage the speed of qBittorrent downloads based on the number of active streams on Plex and the status of a parity check operation on the Unraid server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages