mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
store file names as the PathBuf
This commit is contained in:
parent
88dfbab0f7
commit
bff6b209c9
4 changed files with 20 additions and 27 deletions
|
|
@ -102,7 +102,7 @@ fn info(
|
|||
#[derive(Serialize)]
|
||||
#[serde(crate = "rocket::serde")]
|
||||
struct F {
|
||||
name: String,
|
||||
path: String,
|
||||
size: String,
|
||||
}
|
||||
let torrent = Torrent::from_storage(&t.bytes, t.time).map_err(|e| {
|
||||
|
|
@ -118,7 +118,7 @@ fn info(
|
|||
files_list: torrent.files.as_ref().map(|f| {
|
||||
f.iter()
|
||||
.map(|f| F {
|
||||
name: f.name(),
|
||||
path: f.path(),
|
||||
size: f.size(),
|
||||
})
|
||||
.collect::<Vec<F>>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue