qbittorrent integration - panuozzo77/StreamingCommunity GitHub Wiki

qBittorrent Integration

This section documents the configuration settings for integrating StreamingCommunity with qBittorrent, allowing you to download content via torrent using qBittorrent's web API.

Configuration Location

These settings are found in the QBIT_CONFIG section of the config.json file:

{
    "QBIT_CONFIG": {
        "host": "192.168.1.51",
        "port": "6666",
        "user": "admin",
        "pass": "adminadmin"
    }
}

Available Settings

host

  • Type: String
  • Default: "192.168.1.51"
  • Description: The IP address or hostname of the qBittorrent server. This can be a local IP address if qBittorrent is running on your local network, or a remote address if you're connecting to a remote server.
  • Usage: Enter the IP address or hostname where your qBittorrent WebUI is accessible.

port

  • Type: String
  • Default: "6666"
  • Description: The port number on which the qBittorrent WebUI is running. This must match the port configured in your qBittorrent settings.
  • Usage: Enter the port number configured for the qBittorrent WebUI.

user

  • Type: String
  • Default: "admin"
  • Description: The username for authenticating with the qBittorrent WebUI. This must match a valid username configured in your qBittorrent settings.
  • Usage: Enter your qBittorrent WebUI username.

pass

  • Type: String
  • Default: "adminadmin"
  • Description: The password for authenticating with the qBittorrent WebUI. This must match the password for the specified username.
  • Usage: Enter your qBittorrent WebUI password.

Setting Up qBittorrent WebUI

Before you can use the qBittorrent integration, you need to enable and configure the qBittorrent WebUI:

  1. Open qBittorrent on your system.

  2. Access Preferences:

    • On Windows/Linux: Tools > Preferences
    • On macOS: qBittorrent > Preferences
  3. Enable Web UI:

    • Navigate to "Web UI" in the left sidebar
    • Check "Web User Interface (Remote Control)"
    • Set your preferred IP address and port
    • Configure authentication settings (username and password)
    • Click "Apply" to save changes
  4. Update Configuration:

    • Update the QBIT_CONFIG section in your config.json file to match your qBittorrent WebUI settings

For detailed instructions on enabling the qBittorrent WebUI, refer to the qBittorrent WebUI Setup Guide.

Security Considerations

  • Network Security: The qBittorrent WebUI transmits login credentials and torrent data. It's recommended to:

    • Use HTTPS if connecting over the internet
    • Restrict access to trusted networks
    • Use a strong password
  • Authentication: Always change the default username and password to prevent unauthorized access.

  • Firewall Configuration: Ensure your firewall allows connections to the configured port.

Using qBittorrent Integration

When the qBittorrent integration is properly configured, StreamingCommunity can:

  1. Send magnet links or torrent files to qBittorrent
  2. Monitor download progress
  3. Access completed downloads

This integration is particularly useful for:

  • Downloading content from torrent sites
  • Managing downloads through qBittorrent's interface
  • Leveraging qBittorrent's advanced features like scheduling and bandwidth management

Programmatic Access

You can access and modify these settings programmatically:

from StreamingCommunity.Util.config_json import config_manager

# Get a configuration value
qbit_host = config_manager.get('QBIT_CONFIG', 'host')

# Set a configuration value
config_manager.set_key('QBIT_CONFIG', 'host', '192.168.1.100')
config_manager.save_config()

Troubleshooting

Common Issues

  1. Connection Refused

    • Verify qBittorrent is running
    • Check that the WebUI is enabled
    • Ensure the IP address and port are correct
    • Check firewall settings
  2. Authentication Failed

    • Verify username and password are correct
    • Check if authentication is required in qBittorrent settings
  3. Cannot Add Torrents

    • Verify you have write permissions to the download directory
    • Check if qBittorrent has reached its maximum number of active torrents

Getting Help

If you encounter issues not covered here:

Related Settings

⚠️ **GitHub.com Fallback** ⚠️