From f73b37c6faebdb7dec5a99d648836b7dbe89d9ce Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 27 Sep 2026 18:11:29 +0000 Subject: [PATCH] pipe-dl progress on /?h --- copyparty/httpcli.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 3ef74a2fa..1c0fc4c96 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -5267,6 +5267,8 @@ class HttpCli(object): self.send_headers("oh_f", length=upper - lower, status=status, mime=mime) wr_slp = self.args.s_wr_slp wr_sz = self.args.s_wr_sz + dls = self.conn.hsrv.dls + dl_id = self.dl_id file_size = job["size"] chunk_size = up2k_chunksize(file_size) num_need = -1 @@ -5286,7 +5288,7 @@ class HttpCli(object): if job: self.pipes.set(req_path, job) - if not job: + if not job or not job["hash"]: t = "pipe: OK, upload has finished; yeeting remainder" self.log(t, 2) data_end = file_size @@ -5383,6 +5385,9 @@ class HttpCli(object): broken = True break + if dl_id: + dls[dl_id] = (time.time(), lower) + if lower < upper and not broken: with open_nolock(req_path, "rb") as f: remains = sendfile_py( @@ -5394,8 +5399,8 @@ class HttpCli(object): wr_sz, wr_slp, not self.args.no_poll, - self.conn.hsrv.dls, - self.dl_id, + dls, + dl_id, ) spd = self._spd((upper - lower) - remains)