summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/SkipRev.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-19 11:44:49 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-19 11:44:49 +0200
commit56389e28ba5d2f5658278bc7f486d73be747f135 (patch)
treeac51ad216508487294b15fcaebc813b3add5c393 /module/plugins/hooks/SkipRev.py
parentCode cosmetics (3) (diff)
downloadpyload-56389e28ba5d2f5658278bc7f486d73be747f135.tar.xz
Rename self.core to self.pyload (plugins only)
Diffstat (limited to 'module/plugins/hooks/SkipRev.py')
-rw-r--r--module/plugins/hooks/SkipRev.py8
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