From a9f070cebd0af09e9942a595946a2eb84bacde13 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 18 Aug 2011 12:20:21 +0200 Subject: generic multihoster plugin --- module/network/HTTPDownload.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'module/network') diff --git a/module/network/HTTPDownload.py b/module/network/HTTPDownload.py index b5f6313d5..440a3defa 100644 --- a/module/network/HTTPDownload.py +++ b/module/network/HTTPDownload.py @@ -151,6 +151,7 @@ class HTTPDownload(): lastTimeCheck = 0 chunksDone = set() chunksCreated = False + done = False if self.info.getCount() > 1: # This is a resume, if we were chunked originally assume still can self.chunkSupport=True @@ -206,9 +207,13 @@ class HTTPDownload(): chunksDone.add(c[0]) if not num_q: lastFinishCheck = t + + if len(chunksDone) == len(self.chunks): + done = True #all chunks loaded + break - if len(chunksDone) == len(self.chunks): + if done: break #all chunks loaded # calc speed once per second -- cgit v1.2.3