summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPDownload.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/network/HTTPDownload.py')
-rw-r--r--module/network/HTTPDownload.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py
index 4c9d0705d..50b33cd97 100644
--- a/module/network/HTTPDownload.py
+++ b/module/network/HTTPDownload.py
@@ -48,8 +48,6 @@ class HTTPDownload():
self.chunks = []
- self.infoSaved = False # needed for 1 chunk resume
-
try:
self.info = ChunkInfo.load(filename)
self.info.resume = True #resume is only possible with valid info file
@@ -123,6 +121,7 @@ class HTTPDownload():
def _download(self, chunks, resume):
if not resume:
+ self.info.clear()
self.info.addChunk("%s.chunk0" % self.filename, (0, 0)) #create an initial entry
init = HTTPChunk(0, self, None, resume) #initial chunk that will load complete file (if needed)
@@ -134,15 +133,8 @@ class HTTPDownload():
chunksCreated = False
while 1:
- if (chunks == 1) and self.chunkSupport and self.size and not self.infoSaved:
- # if chunk size is one, save info file here to achieve resume support
- self.info.setSize(self.size)
- self.info.createChunks(1)
- self.info.save()
- self.infoSaved = True
-
#need to create chunks
- if not chunksCreated and self.chunkSupport and self.size: #will be set later by first chunk
+ if not chunksCreated and self.chunkSupport and self.size: #will be setted later by first chunk
if not resume:
self.info.setSize(self.size)