summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/common/packagetools.py15
-rw-r--r--module/web/json_app.py2
2 files changed, 9 insertions, 8 deletions
diff --git a/module/common/packagetools.py b/module/common/packagetools.py
index 36f4d753f..175c48937 100644
--- a/module/common/packagetools.py
+++ b/module/common/packagetools.py
@@ -39,6 +39,14 @@ def parseNames(files):
iszPats = [ pat18, pat19 ]
for file in files:
+ # remove trailing /
+ name = file.rstrip('/')
+ # extract last path part .. if there is a path
+ split = name.rsplit("/", 1)
+ if len(split) > 1:
+ name = split.pop(1)
+
+
#check if a already existing package may be ok for this file
found = False
for name in packs:
@@ -49,13 +57,6 @@ def parseNames(files):
if found: continue
- # remove trailing /
- name = file.rstrip('/')
-
- # extract last path part .. if there is a path
- split = name.rsplit("/", 1)
- if len(split) > 1:
- name = split.pop(1)
# unrar pattern
for pattern in rarPats:
diff --git a/module/web/json_app.py b/module/web/json_app.py
index 91c33c622..a8684da7d 100644
--- a/module/web/json_app.py
+++ b/module/web/json_app.py
@@ -212,7 +212,7 @@ def restart_link(id):
@login_required('delete')
def abort_link(id):
try:
- PYLOAD.stopDownload("link", id)
+ PYLOAD.stopDownloads([id])
return {"response": "success"}
except:
return HTTPError()