Expand description
Metalink (.meta4 / .metalink) download support.
Metalink is a standard XML format (RFC 5854 for .meta4) that describes a
file along with multiple download mirrors and cryptographic checksums.
KGet parses the manifest, tries each mirror in priority order, and verifies
the hash after a successful download — all automatically.
§Supported features
- Multiple mirrors with optional
priorityattribute (lower = preferred) sha-256,sha-512, andmd5hash types (sha-256 preferred)- Multiple
<file>entries per manifest - Local
.meta4files and remote.meta4URLs
§Example
use kget::metalink::download_metalink;
use kget::{ProxyConfig, Optimizer};
download_metalink(
"ubuntu-24.04.meta4",
"~/Downloads",
false,
ProxyConfig::default(),
Optimizer::new(),
).unwrap();Structs§
- Metalink
Doc - A parsed Metalink manifest, potentially containing multiple files.
- Metalink
File - A single file described in a Metalink manifest.
- Metalink
Url - A single download URL with an optional priority (lower number = tried first).
Functions§
- download_
metalink - Download all files described in a Metalink source.
- is_
metalink - Return
trueifsourcelooks like a local or remote Metalink file. - parse
- Parse a
.meta4or.metalinkXML string into aMetalinkDoc.