diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-16 23:03:48 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-16 23:03:48 +0100 |
commit | bc47c7282b093eabe70d7a04bb481789e4cebf65 (patch) | |
tree | ba64518818e99cf4259ea7c602dad81c05924b55 | |
parent | [SimpleHoster] Improve and fix (diff) | |
download | pyload-bc47c7282b093eabe70d7a04bb481789e4cebf65.tar.xz |
[SkipRev] Another fix
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index d21aa0f6d..0c38ac9af 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -10,7 +10,7 @@ from module.plugins.Plugin import SkipDownload class SkipRev(Hook): __name__ = "SkipRev" __type__ = "hook" - __version__ = "0.16" + __version__ = "0.17" __config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)] @@ -57,7 +57,7 @@ class SkipRev(Hook): tokeep = self.getConfig("tokeep") if tokeep: - saved = [True for link in pyfile.package().getChildren() \ + saved = [True for link in self.core.api.getPackageData(pyfile.packageid).links \ if link.name.endswith(".rev") and (link.hasStatus("finished") or link.hasStatus("downloading"))].count(True) if not saved or saved < tokeep: #: keep one rev at least in auto mode @@ -73,7 +73,7 @@ class SkipRev(Hook): if not tokeep: return - for link in pyfile.package().getChildren(): + for link in self.core.api.getPackageData(pyfile.packageid).links: if link.hasStatus("skipped") and link.name.endswith(".rev"): if tokeep > -1 or pyfile.name.endswith(".rev"): link.setStatus("queued") |