Expand description
Download file I/O helpers: partial file detection, stream-to-disk writing, cover art fetch.
Constants§
- DOWNLOAD_
RETRY_ BASE_ DELAY_ MS - Base delay in milliseconds for download retry exponential backoff.
- MAX_
DOWNLOAD_ RETRIES - Maximum number of retry attempts on download network errors.
Functions§
- attempt_
download - Performs a single download attempt, optionally resuming from a partial file.
- detect_
partial_ file - Detects whether a partial file exists on disk with non-zero size.
- is_
retryable_ network_ error - Checks whether an error is a transient network failure worth retrying.
- save_
track_ to_ disk - Saves a streaming response to disk with formatted filename.
- write_
response_ to_ file - Writes a streaming HTTP response to a file, optionally appending.