This n8n workflow automates the process of managing ‘speed limits’ in qBittorrent based on specific triggers. It listens for webhook POST requests, checks whether a media playback action (‘resume’, ‘play’, ‘pause’, ‘stop’) is requested, and dynamically adjusts download speeds by toggling the speed limits mode in qBittorrent. The workflow includes steps for managing cookies to authenticate API requests, verifying current speed limit states, and toggling the throttle on or off accordingly. It ensures efficient bandwidth usage based on media activity, making it ideal for users who want to optimize their download speeds during media playback.
### Workflow Breakdown
1. **Webhook Trigger:** Listens for incoming POST requests to a specified endpoint, serving as the entry point for media control commands.
2. **Payload Switch:** Checks if the request payload contains media actions like ‘media.resume’, ‘media.play’, ‘media.pause’, or ‘media.stop’.
3. **Conditional Checks:** Determines if the media is local or remote to decide whether to proceed with throttling adjustments.
4. **Authentication:** Retrieves login cookies from qBittorrent API using stored global variables, enabling authenticated requests.
5. **Speed Limit Check:** Sends API requests to check whether speed limits are currently enabled in qBittorrent.
6. **Toggling Throttle:** Based on the current state, it enables or disables speed throttling to control bandwidth during media playback.
7. **Control Nodes:** Includes NoOp nodes for logical flow control, and HTTP requests for API interactions with qBittorrent.
### Use Cases
This workflow is perfect for users who want to prioritize streaming or media playback by temporarily reducing download speeds or restoring full bandwidth afterward. It streamlines bandwidth management without manual intervention, enhancing the media experience in shared or limited internet environments.
Reviews
There are no reviews yet.