TEST
This commit is contained in:
parent
44211bcbc9
commit
3225952c69
@ -23,12 +23,12 @@ def download():
|
|||||||
f = open(path, "wb")
|
f = open(path, "wb")
|
||||||
_size = 0
|
_size = 0
|
||||||
try:
|
try:
|
||||||
for t in p.iter_content(chunk_size=64 * 1024):
|
for T in p.iter_content(chunk_size=64 * 1024):
|
||||||
if Common.forceNotDownload:
|
if Common.forceNotDownload:
|
||||||
Common.modifyLastDownloadStatus("Force Stop Download".format(path))
|
Common.modifyLastDownloadStatus("Force Stop Download".format(path))
|
||||||
return
|
break
|
||||||
f.write(t)
|
f.write(T)
|
||||||
_size += len(t)
|
_size += len(T)
|
||||||
Common.modifyLastDownloadStatus(
|
Common.modifyLastDownloadStatus(
|
||||||
"Downloading >{}< @ {:.2f}%".format(path, 100.0 * _size / Common.config["p_s"]))
|
"Downloading >{}< @ {:.2f}%".format(path, 100.0 * _size / Common.config["p_s"]))
|
||||||
if _size > Common.config["p_s"]:
|
if _size > Common.config["p_s"]:
|
||||||
@ -42,7 +42,7 @@ def download():
|
|||||||
if os.path.getsize(path) < 1024 * 1024:
|
if os.path.getsize(path) < 1024 * 1024:
|
||||||
Common.modifyLastDownloadStatus("Downloaded File >{}< is too small, will ignore it".format(path))
|
Common.modifyLastDownloadStatus("Downloaded File >{}< is too small, will ignore it".format(path))
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
return False
|
break
|
||||||
Common.encodeQueue.put(path)
|
Common.encodeQueue.put(path)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user