request settings - panuozzo77/StreamingCommunity GitHub Wiki

Request Settings

This section documents the network request configuration settings in StreamingCommunity. These settings control how the application interacts with remote servers when fetching content.

Configuration Location

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

{
    "REQUESTS": {
        "verify": false,
        "timeout": 20,
        "max_retry": 8
    }
}

Available Settings

verify

  • Type: Boolean
  • Default: false
  • Description: Controls SSL certificate verification for HTTPS requests. When enabled, the application will verify SSL certificates when connecting to secure websites.
  • Usage:
    • Set to true for increased security (recommended for production environments)
    • Set to false to bypass SSL certificate verification (useful for development or when dealing with sites that have invalid certificates)
  • Security Note: Disabling SSL verification can expose you to man-in-the-middle attacks. Only disable this in trusted environments.

timeout

  • Type: Integer
  • Default: 20
  • Description: The maximum time (in seconds) to wait for a response from the server before timing out. This applies to all network requests made by the application.
  • Usage:
    • Increase this value if you have a slow internet connection or if servers are responding slowly
    • Decrease this value if you want faster failure detection, but be aware that it might cause more timeout errors

max_retry

  • Type: Integer
  • Default: 8
  • Description: The number of retry attempts per segment during M3U8 index download. If a segment download fails, the application will retry up to this many times before giving up.
  • Usage:
    • Increase this value for more resilient downloads on unstable connections
    • Decrease this value if you want faster failure detection and don't want to wait for multiple retries

Network Behavior

These settings affect how StreamingCommunity interacts with remote servers:

  1. Connection Establishment: The application will attempt to establish a connection to the remote server.
  2. Request Timeout: If the server doesn't respond within the specified timeout period, the request will fail.
  3. SSL Verification: If verify is enabled, the application will check that the server's SSL certificate is valid.
  4. Retry Logic: If a segment download fails during M3U8 download, the application will retry up to max_retry times.

Advanced Usage

Handling Slow Connections

If you have a slow or unstable internet connection, consider:

  • Increasing timeout to 30-60 seconds
  • Increasing max_retry to 12-15

Handling Secure Environments

For increased security:

  • Set verify to true
  • Ensure your system's CA certificates are up to date

Programmatic Access

You can access and modify these settings programmatically:

from StreamingCommunity.Util.config_json import config_manager

# Get a configuration value
timeout = config_manager.get_int('REQUESTS', 'timeout')

# Set a configuration value
config_manager.set_key('REQUESTS', 'timeout', 30)
config_manager.save_config()

Related Settings

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