summaryrefslogtreecommitdiffstats
path: root/module/file_list.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-24 01:28:08 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-24 01:28:08 +0100
commitea04c11ce1fb52895449a56e862eff5448ea456a (patch)
treeb0eb5c841b082ee5777ad072d5754a67cff383fc /module/file_list.py
parentdownload speed limit (diff)
downloadpyload-ea04c11ce1fb52895449a56e862eff5448ea456a.tar.xz
downloads are now aborted correctly, gui: remove downloads, new icons
Diffstat (limited to 'module/file_list.py')
-rw-r--r--module/file_list.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/file_list.py b/module/file_list.py
index f156e2c0d..9d7260889 100644
--- a/module/file_list.py
+++ b/module/file_list.py
@@ -29,6 +29,7 @@ import cPickle
import re
import module.Plugin
from os import sep
+from time import sleep
class NoSuchElementException(Exception):
pass
@@ -285,6 +286,9 @@ class File_List(object):
packager.file_list.lock.acquire()
try:
key, n, pypack = packager._getPackageFromID(id)
+ for pyfile in pypack.files:
+ pyfile.plugin.req.abort = True
+ sleep(0.1)
del packager.file_list.data[key][n]
finally:
packager.file_list.lock.release()
@@ -296,6 +300,8 @@ class File_List(object):
packager.file_list.lock.acquire()
try:
key, n, pyfile, pypack, pid = packager._getFileFromID(id)
+ pyfile.plugin.req.abort = True
+ sleep(0.1)
del pypack.files[n]
if not pypack.files:
packager.removePackage(pid)