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)
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))
class LiteralDownloader:
- implements(IDownloadStatus)
-
def __init__(self, client, u, downloadable):
self._uri = IFileURI(u)
assert isinstance(self._uri, uri.LiteralFileURI)
<td><n:slot name="progress"/></td>
<td><n:slot name="status"/></td>
</tr>
- <tr n:pattern="empty"><td>No current uploads!</td></tr>
+ <tr n:pattern="empty"><td>No current downloads!</td></tr>
</table>
<div>Return to the <a href="/">Welcome Page</a></div>