uqload_downloader_dart library
A Dart library for downloading videos from UQLoad.io
Classes
- FileDownloader
- Downloads a file from a given URL and saves it locally
- ParallelUrlFetcher
- Fetches multiple URLs concurrently using isolates/futures
- ProgressBar
- A simple progress bar for displaying download progress
- UQLoad
- Handles video information retrieval and downloading from UQload.io
- VideoInfo
- Video information data class
Functions
-
generateRandomFilename(
) → String - Generates a random UUID-like string for filenames
-
isUqloadUrl(
String url) → bool - Checks if the provided URL is a valid UQLoad URL
-
removeSpecialCharacters(
String inputString) → String - Removes special characters from a string, leaving only alphanumeric characters, spaces, hyphens, underscores, and certain accented characters
-
sizeOfFmt(
int num, [String suffix = "B"]) → String - Converts a file size in bytes into a human-readable string format
-
validateCallback(
ProgressCallback? callback) → void -
validateDirectory(
[String? outputDir]) → String - Validates and returns a valid output directory path
-
validateOutputFile(
String outputFile) → String - Validates and sanitizes the output file name
Typedefs
- ProgressCallback = void Function(int downloaded, int total)
- Checks if the provided callback is valid
Exceptions / Errors
- DownloadException
- Exception thrown when a file cannot be downloaded
- InvalidUrlException
- Exception thrown when an invalid URL is provided
- VideoNotFoundException
- Exception thrown when a video is not found or has been deleted