-
Notifications
You must be signed in to change notification settings - Fork 152
Feature request: Allow infoHash string for torrent add input #258
Copy link
Copy link
Closed
Labels
Description
qBittorrent supports this, you just paste an infohash and it treats it as a magnet link with that infohash.
I'm thinking something like this can be added in the session.rs code to call itself again(recursively) with an infohash
AddTorrent::Url(url) if url.len() == 40 && url.chars().all(char::is_ascii_hex_digit) => {
let magnet_url = format!("magnet:?xt=urn:btih:{}", url);
self.add_torrent(AddTorrent::Url(magnet_url), opts).await
I don't write any rust but I would have attempted this still, if not for the scary spaghetti monster that is the function there :
Why is it not split up in multiple functions, to avoid the procedure calls overhead maybe ?
Great project btw,we really do need an alternative to libtorrent/rtorrent etc.
Reactions are currently unavailable