summaryrefslogtreecommitdiffstats
path: root/pyload/datatypes
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-06 18:15:24 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-06 18:15:24 +0100
commit1f4c6cd6e4b712263b40de4ce1fcebe716019b4f (patch)
treed25db580032edff61a58b3be426b4681e23addf8 /pyload/datatypes
parentfixed jshint (diff)
downloadpyload-1f4c6cd6e4b712263b40de4ce1fcebe716019b4f.tar.xz
package edit dialog
Diffstat (limited to 'pyload/datatypes')
-rw-r--r--pyload/datatypes/PyPackage.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pyload/datatypes/PyPackage.py b/pyload/datatypes/PyPackage.py
index fa58c0fd2..955986942 100644
--- a/pyload/datatypes/PyPackage.py
+++ b/pyload/datatypes/PyPackage.py
@@ -66,6 +66,12 @@ class PyPackage:
self.comment, self.password, self.added, self.tags, self.status, self.shared, self.packageorder
)
+ def updateFromInfoData(self, pack):
+ """ Updated allowed values from info data """
+ for attr in PackageInfo.__slots__:
+ if attr in ("site", "comment", "password"):
+ setattr(self, attr, getattr(pack, attr))
+
def getFiles(self):
"""get contaied files data"""
return self.m.core.db.getAllFiles(package=self.pid)
@@ -88,7 +94,7 @@ class PyPackage:
def deleteIfEmpty(self):
""" True if deleted """
- if not len(self.getChildren()):
+ if not len(self.getFiles()):
self.delete()
return True
return False