summaryrefslogtreecommitdiffstats
path: root/module/network/HTTPChunk.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/network/HTTPChunk.py')
-rw-r--r--module/network/HTTPChunk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py
index cf77ccae6..0fee75682 100644
--- a/module/network/HTTPChunk.py
+++ b/module/network/HTTPChunk.py
@@ -16,7 +16,7 @@
@author: RaNaN
"""
-from os import remove
+from os import remove, stat
from os.path import exists
from time import sleep
from re import search
@@ -157,6 +157,8 @@ class HTTPChunk(HTTPRequest):
if self.resume:
self.fp = open(self.p.info.getChunkName(self.id), "ab")
self.arrived = self.fp.tell()
+ if not self.arrived:
+ self.arrived = stat(self.p.info.getChunkName(self.id)).st_size
if self.range:
#do nothing if chunk already finished