Merge pull request #8 from pcmid/pcmid/fix/wrong_result_for_mbps
Fix: multiply the number of bytes by 8
This commit is contained in:
commit
81cf94b55d
2 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ impl Speed {
|
||||||
fn new(mbps: f64) -> Self {
|
fn new(mbps: f64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
mbps,
|
mbps,
|
||||||
human_readable: format!("{:.2}Mbps", mbps),
|
human_readable: format!("{:.2} MiB/s", mbps),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -355,7 +355,7 @@ impl HttpApi {
|
||||||
return Ok::<_, warp::Rejection>(make_response(
|
return Ok::<_, warp::Rejection>(make_response(
|
||||||
400,
|
400,
|
||||||
"invalid utf-8".into(),
|
"invalid utf-8".into(),
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let opts = AddTorrentOptions {
|
let opts = AddTorrentOptions {
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ async fn async_main(opts: Opts, spawner: BlockingSpawner) -> anyhow::Result<()>
|
||||||
(progress as f64 / total as f64) * 100f64
|
(progress as f64 / total as f64) * 100f64
|
||||||
};
|
};
|
||||||
info!(
|
info!(
|
||||||
"[{}]: {:.2}% ({:.2}), down speed {:.2} Mbps, fetched {}, remaining {:.2} of {:.2}, uploaded {:.2}, peers: {{live: {}, connecting: {}, queued: {}, seen: {}}}",
|
"[{}]: {:.2}% ({:.2}), down speed {:.2} MiB/s, fetched {}, remaining {:.2} of {:.2}, uploaded {:.2}, peers: {{live: {}, connecting: {}, queued: {}, seen: {}}}",
|
||||||
idx,
|
idx,
|
||||||
downloaded_pct,
|
downloaded_pct,
|
||||||
SF::new(progress),
|
SF::new(progress),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue