Add support for BTv2 magnet links

This commit is contained in:
Joshua Abraham 2023-12-24 16:53:02 -06:00
parent 1157866152
commit 0836b651a7
21 changed files with 236 additions and 157 deletions

View file

@ -12,7 +12,7 @@ async fn main() -> anyhow::Result<()> {
.nth(1)
.expect("first argument should be a magnet link");
let magnet = Magnet::parse(&magnet).unwrap();
let info_hash = magnet.info_hash;
let info_hash = magnet.as_id20().context("Supplied magnet link didn't contain a BTv1 infohash")?;
tracing_subscriber::fmt::init();