mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
add dn argument option
This commit is contained in:
parent
0dae0bbb53
commit
8e4ddd0d62
1 changed files with 4 additions and 0 deletions
|
|
@ -85,6 +85,10 @@ impl Torrent {
|
|||
|
||||
pub fn magnet(&self, trackers: Option<&Vec<url::Url>>) -> String {
|
||||
let mut b = format!("magnet:?xt=urn:btih:{}", self.info_hash);
|
||||
if let Some(ref n) = self.name {
|
||||
b.push_str("&dn=");
|
||||
b.push_str(&urlencoding::encode(n))
|
||||
}
|
||||
if let Some(t) = trackers {
|
||||
for tracker in t {
|
||||
b.push_str("&tr=");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue