bep 47: serialize/deserialize new fields
This commit is contained in:
parent
60cea68985
commit
af0389de05
3 changed files with 39 additions and 1 deletions
|
|
@ -124,7 +124,13 @@ async fn create_torrent_raw<'a>(
|
|||
.components()
|
||||
.map(|c| osstr_to_bytes(c.as_os_str()).into())
|
||||
.collect();
|
||||
output_files.push(TorrentMetaV1File { length, path });
|
||||
output_files.push(TorrentMetaV1File {
|
||||
length,
|
||||
path,
|
||||
attr: None,
|
||||
sha1: None,
|
||||
symlink_path: None,
|
||||
});
|
||||
continue 'outer;
|
||||
}
|
||||
|
||||
|
|
@ -154,6 +160,9 @@ async fn create_torrent_raw<'a>(
|
|||
} else {
|
||||
Some(output_files)
|
||||
},
|
||||
attr: None,
|
||||
sha1: None,
|
||||
symlink_path: None,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -402,9 +402,15 @@ mod tests {
|
|||
.map(|f| TorrentMetaV1File {
|
||||
length: 1,
|
||||
path: f.split("/").map(|f| f.as_bytes().into()).collect(),
|
||||
attr: None,
|
||||
sha1: None,
|
||||
symlink_path: None,
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
attr: None,
|
||||
sha1: None,
|
||||
symlink_path: None,
|
||||
},
|
||||
comment: None,
|
||||
created_by: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue