misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
Torrents: a pause during a piece's hash check no longer leaves the torrent one piece short (#706) (#717)
Ahmed Nefzaoui32881b9d7f20
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e8e5f785..cc8c9fa1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -19,6 +19,7 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see### Fixed+- Torrents: pausing a torrent just as one of its pieces was being checked no longer leaves it one piece short for good. That piece was neither counted as downloaded nor asked for again, so the torrent stopped just before the end, and pausing and starting it again didn't help, only restarting MDM did; a pause now puts that piece back to be downloaded again ([#706](https://github.com/anefzaoui/misterdownloadmanager/issues/706)).- Torrents: the window no longer freezes while torrents run on a busy or slow disk (an antivirus scanning each write, a disk that is full of other work). The window read each torrent's numbers from the torrent engine on every frame, and the engine holds a torrent while it is paused, removed or added until its writes to the disk have ended, seconds on such a disk; the window waited that long ("freeze in mdm_torrent::Torrents::stats"). The numbers are now read beside the window, five times a second and at once after each change, and the list, the progress window's tabs, **Files...** and the right-click menu show the last ones without waiting ([#693](https://github.com/anefzaoui/misterdownloadmanager/issues/693)).- The window no longer waits for the program that owns the clipboard. A text box's right-click menu (to offer **Paste**) and **Add URL**, **Add batch download**, **Add torrent** and **Download video** (to fill in a copied link) read the clipboard on the window's own thread, so a program that held the clipboard without answering (on Linux, where a read waited up to 4 seconds each time, and while the right-click menu was open at every frame; on Windows, a program that had stopped responding) held up MDM's window too. They now read it beside the window, as the clipboard monitor has since 0.5.1; a link copied just before still fills the box as the window opens (follows [#418](https://github.com/anefzaoui/misterdownloadmanager/issues/418)).- Linux: freeze and crash reports show MDM's own functions, files and lines again, and the right ones. When MDM's code began a page after the start of the program in memory (as 0.5.0's did), the report read the whole stack at the wrong place: it showed only system libraries (`freeze in libc.so.6+…`), named other functions of MDM once the release's symbols were fetched, and couldn't find an existing issue for the same problem. A `.dmp` from such a report reads right too ([#661](https://github.com/anefzaoui/misterdownloadmanager/issues/661)).diff --git a/Cargo.lock b/Cargo.lockindex 52c3a799..ca1f0234 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3975,7 +3975,7 @@ dependencies = [[[package]]name = "librqbit"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","arc-swap",@@ -4038,7 +4038,7 @@ dependencies = [[[package]]name = "librqbit-bencode"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","arrayvec",@@ -4054,7 +4054,7 @@ dependencies = [[[package]]name = "librqbit-buffers"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["bytes","librqbit-clone-to-owned",@@ -4065,7 +4065,7 @@ dependencies = [[[package]]name = "librqbit-clone-to-owned"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["bytes",]@@ -4073,7 +4073,7 @@ dependencies = [[[package]]name = "librqbit-core"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","bytes",@@ -4102,7 +4102,7 @@ dependencies = [[[package]]name = "librqbit-dht"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","backon",@@ -4149,7 +4149,7 @@ dependencies = [[[package]]name = "librqbit-lsd"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","atoi",@@ -4168,7 +4168,7 @@ dependencies = [[[package]]name = "librqbit-peer-protocol"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","bitvec",@@ -4188,7 +4188,7 @@ dependencies = [[[package]]name = "librqbit-sha1-wrapper"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["assert_cfg","aws-lc-rs",@@ -4197,7 +4197,7 @@ dependencies = [[[package]]name = "librqbit-tracker-comms"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","async-stream",@@ -4225,7 +4225,7 @@ dependencies = [[[package]]name = "librqbit-upnp"version = "9.1.0"-source = "git+https://github.com/anefzaoui/rqbit.git?rev=ac7fa6e06b1a95956c63e1f5fd1cd795985967e1#ac7fa6e06b1a95956c63e1f5fd1cd795985967e1"+source = "git+https://github.com/anefzaoui/rqbit.git?rev=694291b61fcfd6a77fef7762541b0ef25773ae31#694291b61fcfd6a77fef7762541b0ef25773ae31"dependencies = ["anyhow","bstr",diff --git a/Cargo.toml b/Cargo.tomlindex ad55749c..03e85201 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -196,19 +196,20 @@ debug = "line-tables-only"# magnet lookup's progress counted (#92), and every socket bound to one address (`bind_ip`,# #143), and every HTTP client of a session built through MDM's TLS setup (`configure_http_client`:# a system without CA certificates), and a DHT that stops asking a bootstrap node that never-# answers once another one has, and loads its saved IPv6 nodes (#650), until upstream has them+# answers once another one has, and loads its saved IPv6 nodes (#650), and a piece whose hash+# check a pause cuts short queued again instead of lost (#706), until upstream has them# (ikatson/rqbit); every crate of that repository from the same commit.-librqbit = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-bencode = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-buffers = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-clone-to-owned = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-core = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-dht = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-lsd = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-peer-protocol = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-sha1-wrapper = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-tracker-comms = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }-librqbit-upnp = { git = "https://github.com/anefzaoui/rqbit.git", rev = "ac7fa6e06b1a95956c63e1f5fd1cd795985967e1" }+librqbit = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-bencode = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-buffers = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-clone-to-owned = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-core = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-dht = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-lsd = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-peer-protocol = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-sha1-wrapper = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-tracker-comms = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }+librqbit-upnp = { git = "https://github.com/anefzaoui/rqbit.git", rev = "694291b61fcfd6a77fef7762541b0ef25773ae31" }ecolor = { git = "https://github.com/anefzaoui/egui.git", rev = "4ad60e5365470a6d12166a8075478f8aea44c9f8" }emath = { git = "https://github.com/anefzaoui/egui.git", rev = "4ad60e5365470a6d12166a8075478f8aea44c9f8" }epaint = { git = "https://github.com/anefzaoui/egui.git", rev = "4ad60e5365470a6d12166a8075478f8aea44c9f8" }diff --git a/ROADMAP.md b/ROADMAP.mdindex f1a09a93..081ba28b 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -585,6 +585,9 @@ These ship in a later version, when they're ready.### Bugs being looked into+- 🔄 Torrents: a pause landing while a piece was being checked leaving the torrent one piece short+ until MDM restarted ([#706](https://github.com/anefzaoui/misterdownloadmanager/issues/706)): the+ piece is now downloaded again after the pause; fix in review- 🔄 Torrents: magnet links without trackers finding no peers where the DHT's first nodes didn'tanswer ([#650](https://github.com/anefzaoui/misterdownloadmanager/issues/650)): four publicrouters asked together, the ones that never answer left alone once one has, the IPv6 nodes kept