diff options
Diffstat (limited to 'module/plugins/hooks/SkipRev.py')
-rw-r--r-- | module/plugins/hooks/SkipRev.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 2123a6543..112395c64 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -35,7 +35,7 @@ class SkipRev(Addon): def _pyfile(self, link): - return PyFile(self.core.files, + return PyFile(self.pyload.files, link.fid, link.url, link.name, @@ -59,7 +59,7 @@ class SkipRev(Addon): status_list = (1, 4, 8, 9, 14) if revtokeep < 0 else (1, 3, 4, 8, 9, 14) pyname = re.compile(r'%s\.part\d+\.rev$' % name.rsplit('.', 2)[0].replace('.', '\.')) - queued = [True for link in self.core.api.getPackageData(pyfile.package().id).links \ + queued = [True for link in self.pyload.api.getPackageData(pyfile.package().id).links \ if link.status not in status_list and pyname.match(link.name)].count(True) if not queued or queued < revtokeep: #: Keep one rev at least in auto mode @@ -85,7 +85,7 @@ class SkipRev(Addon): pyname = re.compile(r'%s\.part\d+\.rev$' % pyfile.name.rsplit('.', 2)[0].replace('.', '\.')) - for link in self.core.api.getPackageData(pyfile.package().id).links: + for link in self.pyload.api.getPackageData(pyfile.package().id).links: if link.status is 4 and pyname.match(link.name): pylink = self._pyfile(link) @@ -94,6 +94,6 @@ class SkipRev(Addon): else: pylink.setCustomStatus(_("unskipped"), "queued") - self.core.files.save() + self.pyload.files.save() pylink.release() return |