summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/addon
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/addon')
-rw-r--r--pyload/plugin/addon/AntiVirus.py2
-rw-r--r--pyload/plugin/addon/ExternalScripts.py8
-rw-r--r--pyload/plugin/addon/ExtractArchive.py10
-rw-r--r--pyload/plugin/addon/UpdateManager.py8
-rw-r--r--pyload/plugin/addon/UserAgentSwitcher.py4
5 files changed, 10 insertions, 22 deletions
diff --git a/pyload/plugin/addon/AntiVirus.py b/pyload/plugin/addon/AntiVirus.py
index 3866014ee..87780e337 100644
--- a/pyload/plugin/addon/AntiVirus.py
+++ b/pyload/plugin/addon/AntiVirus.py
@@ -28,8 +28,6 @@ class AntiVirus(Addon):
def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
try:
import send2trash
diff --git a/pyload/plugin/addon/ExternalScripts.py b/pyload/plugin/addon/ExternalScripts.py
index 75c9ae810..19d5202fd 100644
--- a/pyload/plugin/addon/ExternalScripts.py
+++ b/pyload/plugin/addon/ExternalScripts.py
@@ -30,7 +30,7 @@ class ExternalScripts(Addon):
def setup(self):
- self.info = {'oldip': None}
+ self.info['oldip'] = None
self.scripts = {}
folders = ["pyload_start", "pyload_restart", "pyload_stop",
@@ -38,7 +38,7 @@ class ExternalScripts(Addon):
"download_preparing", "download_failed", "download_finished",
"archive_extract_failed", "archive_extracted",
"package_finished", "package_deleted", "package_extract_failed", "package_extracted",
- "all_downloads_processed", "all_downloads_finished", # @TODO: Invert `all_downloads_processed`, `all_downloads_finished` order in 0.4.10
+ "all_downloads_processed", "all_downloads_finished", #@TODO: Invert `all_downloads_processed`, `all_downloads_finished` order in 0.4.10
"all_archives_extracted", "all_archives_processed"]
for folder in folders:
@@ -84,7 +84,7 @@ class ExternalScripts(Addon):
self.logDebug("Executing: %s" % os.path.abspath(script), "Args: " + ' '.join(cmd_args))
- p = subprocess.Popen(cmd, bufsize=-1) # @NOTE: output goes to pyload
+ p = subprocess.Popen(cmd, bufsize=-1) #@NOTE: output goes to pyload
if self.getConfig('waitend'):
p.communicate()
@@ -113,7 +113,7 @@ class ExternalScripts(Addon):
def afterReconnecting(self, ip):
for script in self.scripts['after_reconnect']:
- self.callScript(script, ip, self.info['oldip']) # @TODO: Use built-in oldip in 0.4.10
+ self.callScript(script, ip, self.info['oldip']) #@TODO: Use built-in oldip in 0.4.10
def downloadPreparing(self, pyfile):
diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py
index ce67cbcaf..a4a28ab32 100644
--- a/pyload/plugin/addon/ExtractArchive.py
+++ b/pyload/plugin/addon/ExtractArchive.py
@@ -198,11 +198,11 @@ class ExtractArchive(Addon):
while packages:
if self.lastPackage: #: called from allDownloadsProcessed
self.lastPackage = False
- if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now
+ if self.extract(packages, thread): #@NOTE: check only if all gone fine, no failed reporting for now
self.manager.dispatchEvent("all_archives_extracted")
self.manager.dispatchEvent("all_archives_processed")
else:
- if self.extract(packages, thread): # @NOTE: check only if all gone fine, no failed reporting for now
+ if self.extract(packages, thread): #@NOTE: check only if all gone fine, no failed reporting for now
pass
packages = self.queue.get() #: check for packages added during extraction
@@ -234,7 +234,7 @@ class ExtractArchive(Addon):
@Expose
- def extract(self, ids, thread=None): # @TODO: Use pypack, not pid to improve method usability
+ def extract(self, ids, thread=None): #@TODO: Use pypack, not pid to improve method usability
if not ids:
return False
@@ -295,7 +295,7 @@ class ExtractArchive(Addon):
new_files_ids = []
if extensions:
- files_ids = [(fname, fid, fout) for fname, fid, fout in files_ids
+ files_ids = [(fname, fid, fout) for fname, fid, fout in files_ids
if filter(lambda ext: fname.lower().endswith(ext), extensions)]
for Extractor in self.extractors:
@@ -341,7 +341,7 @@ class ExtractArchive(Addon):
continue
# remove processed file and related multiparts from list
- files_ids = [(fname, fid, fout) for fname, fid, fout in files_ids
+ files_ids = [(fname, fid, fout) for fname, fid, fout in files_ids
if fname not in archive.getDeleteFiles()]
self.logDebug("Extracted files: %s" % new_files)
self.setPermissions(new_files)
diff --git a/pyload/plugin/addon/UpdateManager.py b/pyload/plugin/addon/UpdateManager.py
index 57498d512..cf8349e79 100644
--- a/pyload/plugin/addon/UpdateManager.py
+++ b/pyload/plugin/addon/UpdateManager.py
@@ -222,7 +222,7 @@ class UpdateManager(Addon):
for plugin in sorted(updatelist, key=itemgetter("type", "name")):
filename = plugin['name']
- prefix = plugin['type']
+ type = plugin['type']
version = plugin['version']
if filename.endswith(".pyc"):
@@ -230,12 +230,6 @@ class UpdateManager(Addon):
else:
name = filename.replace(".py", "")
- #@TODO: Remove in 0.4.10
- if prefix.endswith("s"):
- type = prefix[:-1]
- else:
- type = prefix
-
plugins = getattr(self.core.pluginManager, "%sPlugins" % type)
oldver = float(plugins[name]['version']) if name in plugins else None
diff --git a/pyload/plugin/addon/UserAgentSwitcher.py b/pyload/plugin/addon/UserAgentSwitcher.py
index ec1640e63..31a2b763b 100644
--- a/pyload/plugin/addon/UserAgentSwitcher.py
+++ b/pyload/plugin/addon/UserAgentSwitcher.py
@@ -25,10 +25,6 @@ class UserAgentSwitcher(Addon):
__authors = [("Walter Purcaro", "vuolter@gmail.com")]
- def setup(self):
- self.info = {} #@TODO: Remove in 0.4.10
-
-
def downloadPreparing(self, pyfile):
uar = self.getConfig('uar')
uaf = fs_encode(self.getConfig('uaf'))