request settings - panuozzo77/StreamingCommunity GitHub Wiki
This section documents the network request configuration settings in StreamingCommunity. These settings control how the application interacts with remote servers when fetching content.
These settings are found in the REQUESTS
section of the config.json
file:
{
"REQUESTS": {
"verify": false,
"timeout": 20,
"max_retry": 8
}
}
- 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)
- Set to
- Security Note: Disabling SSL verification can expose you to man-in-the-middle attacks. Only disable this in trusted environments.
- 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
- 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
These settings affect how StreamingCommunity interacts with remote servers:
- Connection Establishment: The application will attempt to establish a connection to the remote server.
-
Request Timeout: If the server doesn't respond within the specified
timeout
period, the request will fail. -
SSL Verification: If
verify
is enabled, the application will check that the server's SSL certificate is valid. -
Retry Logic: If a segment download fails during M3U8 download, the application will retry up to
max_retry
times.
If you have a slow or unstable internet connection, consider:
- Increasing
timeout
to 30-60 seconds - Increasing
max_retry
to 12-15
For increased security:
- Set
verify
totrue
- Ensure your system's CA certificates are up to date
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()
- DEFAULT Settings - Configure general application behavior
- M3U8 Download Settings - Configure download behavior