summaryrefslogtreecommitdiffstats
path: root/module/database
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-12-08 19:50:45 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-12-08 19:50:45 +0100
commit452c57a30ed90adc94d5105b6a98804673439149 (patch)
tree0ca4c3f41246d941542841a2d9b8c5c41ef05e95 /module/database
parentorder change updates cache (diff)
downloadpyload-452c57a30ed90adc94d5105b6a98804673439149.tar.xz
fixed delete
Diffstat (limited to 'module/database')
-rw-r--r--module/database/FileDatabase.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 47013d8de..564fc4562 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -151,7 +151,7 @@ class FileHandler:
"""delete package and all contained links"""
p = self.getPackage(id)
- oldorder = o.order
+ oldorder = p.order
if not p:
if id in self.packageCache: del self.packageCache[id]
@@ -191,7 +191,8 @@ class FileHandler:
pid = f.packageid
e = RemoveEvent("file", id, "collector" if not f.package().queue else "queue")
-
+
+ oldorder = f.order
if id in self.core.threadManager.processingIds():
self.cache[id].abortDownload()
@@ -209,7 +210,7 @@ class FileHandler:
pyfiles = self.cache.values()
for pyfile in pyfiles:
- if pyfile.packageid == f["package"] and f["order"] > position:
+ if pyfile.packageid == f["package"] and pyfile.order > oldorder:
pyfile.order -= 1
pyfile.notifyChange()