nothing
This commit is contained in:
parent
5c5cf3c24a
commit
7fc41fd953
2 changed files with 3 additions and 14 deletions
4
TODO.md
4
TODO.md
|
|
@ -1,5 +1,5 @@
|
||||||
- [ ] Selective file downloading (mostly done)
|
- [x] Selective file downloading (mostly done)
|
||||||
- [ ] Proper counting of how much is left, and how much is downloaded
|
- [x] Proper counting of how much is left, and how much is downloaded
|
||||||
|
|
||||||
- [x] Send bitfield at the start if I have something
|
- [x] Send bitfield at the start if I have something
|
||||||
- [x] use the "update_hash" function in piece checking
|
- [x] use the "update_hash" function in piece checking
|
||||||
|
|
|
||||||
|
|
@ -1225,18 +1225,7 @@ impl TorrentManager {
|
||||||
}
|
}
|
||||||
Ok(response.interval)
|
Ok(response.interval)
|
||||||
}
|
}
|
||||||
fn get_total(&self) -> u64 {
|
|
||||||
if let Some(length) = self.inner.torrent.info.length {
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
self.inner
|
|
||||||
.torrent
|
|
||||||
.info
|
|
||||||
.files
|
|
||||||
.as_ref()
|
|
||||||
.map(|files| files.iter().map(|f| f.length).sum())
|
|
||||||
.unwrap_or_default()
|
|
||||||
}
|
|
||||||
fn get_left_to_download(&self) -> u64 {
|
fn get_left_to_download(&self) -> u64 {
|
||||||
self.inner.needed - self.get_downloaded()
|
self.inner.needed - self.get_downloaded()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue