From: Brian Warner Date: Tue, 26 Feb 2008 22:02:35 +0000 (-0700) Subject: current-downloads status: add SI, size, make numsegs 1-based X-Git-Url: https://git.rkrishnan.org/module-simplejson.decoder.html?a=commitdiff_plain;h=d4bf623b87eaf3ded4f1c01877183208987537c8;p=tahoe-lafs%2Ftahoe-lafs.git current-downloads status: add SI, size, make numsegs 1-based --- diff --git a/src/allmydata/download.py b/src/allmydata/download.py index c4c7ea5d..7632f1e0 100644 --- a/src/allmydata/download.py +++ b/src/allmydata/download.py @@ -389,6 +389,9 @@ class FileDownloader: self._status = s = DownloadStatus() s.set_status("Starting") + s.set_storage_index(self._storage_index) + s.set_size(self._size) + s.set_helper(False) if IConsumer.providedBy(downloadable): downloadable.registerProducer(self, True) @@ -717,7 +720,7 @@ class FileDownloader: def _download_segment(self, res, segnum): if self._status: self._status.set_status("Downloading segment %d of %d" % - (segnum, self._total_segments)) + (segnum+1, self._total_segments)) self.log("downloading seg#%d of %d (%d%%)" % (segnum, self._total_segments, 100.0 * segnum / self._total_segments)) @@ -798,8 +801,6 @@ class FileDownloader: class LiteralDownloader: - implements(IDownloadStatus) - def __init__(self, client, u, downloadable): self._uri = IFileURI(u) assert isinstance(self._uri, uri.LiteralFileURI) diff --git a/src/allmydata/web/status.xhtml b/src/allmydata/web/status.xhtml index 7b331ef0..5e421877 100644 --- a/src/allmydata/web/status.xhtml +++ b/src/allmydata/web/status.xhtml @@ -50,7 +50,7 @@ - No current uploads! + No current downloads!
Return to the Welcome Page