diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-12 14:22:29 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-12 14:22:29 +0200 |
commit | df95882117f287ef77abb1cb115e71576c1c2dab (patch) | |
tree | 1f4c14c8f372a536047692ee977be9b26514e212 /module/FileDatabase.py | |
parent | account fixes (diff) | |
download | pyload-df95882117f287ef77abb1cb115e71576c1c2dab.tar.xz |
unrar hook :D, account fix, other fixes
Diffstat (limited to 'module/FileDatabase.py')
-rw-r--r-- | module/FileDatabase.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py index d45763c05..4757831e7 100644 --- a/module/FileDatabase.py +++ b/module/FileDatabase.py @@ -435,7 +435,7 @@ class FileHandler: ids = self.db.getUnfinished(pyfile.packageid) if not ids or (pyfile.id in ids and len(ids) == 1): if not pyfile.package().setFinished: - self.core.log.info("Package finished: %s" % pyfile.package().name) + self.core.log.info(_("Package finished: %s") % pyfile.package().name) self.core.hookManager.packageFinished(pyfile.package()) pyfile.package().setFinished = True @@ -827,6 +827,9 @@ class PyFile(): self.active = False #obsolete? self.abort = False self.reconnected = False + + #hook progress + self.alternativePercent = None self.m.cache[int(id)] = self @@ -961,6 +964,7 @@ class PyFile(): def getPercent(self): """ get % of download """ + if self.alternativePercent: return self.alternativePercent try: return int((float(self.plugin.req.dl_arrived) / self.plugin.req.dl_size) * 100) except: @@ -1021,7 +1025,7 @@ class PyPackage(): def getChildren(self): """get information about contained links""" - raise NotImplementedError + return self.m.getPackageData(self.id)["links"] def setPriority(self, priority): self.priority = priority |