summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/addons
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-09-15 20:07:09 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-09-24 19:45:29 +0200
commita6e047b16569802fdbfa16bbbbf44fb2a6e5d1a8 (patch)
treee8540e761bbf55f9c7d1a31e0769bbe1c8ed002a /pyload/plugins/addons
parentimproved login / logout rendering (diff)
downloadpyload-a6e047b16569802fdbfa16bbbbf44fb2a6e5d1a8.tar.xz
Merge pull request #218 from vuolter/s/plugin/coreconfig
Use config instead core.config for plugins (cherry picked from commit 511f0e17eb598b078a48a6eac0fdab5438cf539c) Conflicts: pyload/plugins/addons/ClickAndLoad.py
Diffstat (limited to 'pyload/plugins/addons')
-rw-r--r--pyload/plugins/addons/ClickAndLoad.py6
-rw-r--r--pyload/plugins/addons/ExternalScripts.py6
-rw-r--r--pyload/plugins/addons/ExtractArchive.py10
-rw-r--r--pyload/plugins/addons/MergeFiles.py6
4 files changed, 14 insertions, 14 deletions
diff --git a/pyload/plugins/addons/ClickAndLoad.py b/pyload/plugins/addons/ClickAndLoad.py
index 8fe346b51..8958da8af 100644
--- a/pyload/plugins/addons/ClickAndLoad.py
+++ b/pyload/plugins/addons/ClickAndLoad.py
@@ -26,7 +26,7 @@ from module.plugins.Addon import Addon
class ClickAndLoad(Addon):
__name__ = "ClickAndLoad"
- __version__ = "0.21"
+ __version__ = "0.22"
__description__ = """Gives abillity to use jd's click and load. depends on webinterface"""
__config__ = [("activated", "bool", "Activated", "True"),
("extern", "bool", "Allow external link adding", "False")]
@@ -34,8 +34,8 @@ class ClickAndLoad(Addon):
__author_mail__ = ("RaNaN@pyload.de", "mkaay@mkaay.de")
def activate(self):
- self.port = int(self.core.config['webinterface']['port'])
- if self.core.config['webinterface']['activated']:
+ self.port = int(self.config['webinterface']['port'])
+ if self.config['webinterface']['activated']:
try:
if self.getConfig("extern"):
ip = "0.0.0.0"
diff --git a/pyload/plugins/addons/ExternalScripts.py b/pyload/plugins/addons/ExternalScripts.py
index 49774a42b..7b7dafae4 100644
--- a/pyload/plugins/addons/ExternalScripts.py
+++ b/pyload/plugins/addons/ExternalScripts.py
@@ -27,7 +27,7 @@ from module.utils.fs import save_join, exists, join, listdir
class ExternalScripts(Addon):
__name__ = "ExternalScripts"
- __version__ = "0.22"
+ __version__ = "0.23"
__description__ = """Run external scripts"""
__config__ = [("activated", "bool", "Activated", "True")]
__author_name__ = ("mkaay", "RaNaN", "spoob")
@@ -84,12 +84,12 @@ class ExternalScripts(Addon):
def downloadFinished(self, pyfile):
for script in self.scripts['download_finished']:
self.callScript(script, pyfile.pluginname, pyfile.url, pyfile.name,
- save_join(self.core.config['general']['download_folder'],
+ save_join(self.config['general']['download_folder'],
pyfile.package().folder, pyfile.name), pyfile.id)
def packageFinished(self, pypack):
for script in self.scripts['package_finished']:
- folder = self.core.config['general']['download_folder']
+ folder = self.config['general']['download_folder']
folder = save_join(folder, pypack.folder)
self.callScript(script, pypack.name, folder, pypack.password, pypack.id)
diff --git a/pyload/plugins/addons/ExtractArchive.py b/pyload/plugins/addons/ExtractArchive.py
index 91f1f96c5..3592163e7 100644
--- a/pyload/plugins/addons/ExtractArchive.py
+++ b/pyload/plugins/addons/ExtractArchive.py
@@ -58,7 +58,7 @@ class ExtractArchive(Addon):
Provides: unrarFinished (folder, filename)
"""
__name__ = "ExtractArchive"
- __version__ = "0.14"
+ __version__ = "0.15"
__description__ = "Extract different kind of archives"
__config__ = [("activated", "bool", "Activated", True),
("fullpath", "bool", "Extract full path", True),
@@ -302,13 +302,13 @@ class ExtractArchive(Addon):
if not exists(f):
continue
try:
- if self.core.config["permission"]["change_file"]:
+ if self.config["permission"]["change_file"]:
if isfile(f):
- chmod(f, int(self.core.config["permission"]["file"], 8))
+ chmod(f, int(self.config["permission"]["file"], 8))
elif isdir(f):
- chmod(f, int(self.core.config["permission"]["folder"], 8))
+ chmod(f, int(self.config["permission"]["folder"], 8))
- if self.core.config["permission"]["change_dl"] and os.name != "nt":
+ if self.config["permission"]["change_dl"] and os.name != "nt":
uid = getpwnam(self.config["permission"]["user"])[2]
gid = getgrnam(self.config["permission"]["group"])[2]
chown(f, uid, gid)
diff --git a/pyload/plugins/addons/MergeFiles.py b/pyload/plugins/addons/MergeFiles.py
index ce2a35584..7cd7571d1 100644
--- a/pyload/plugins/addons/MergeFiles.py
+++ b/pyload/plugins/addons/MergeFiles.py
@@ -30,7 +30,7 @@ BUFFER_SIZE = 4096
class MergeFiles(Addon):
__name__ = "MergeFiles"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = "Merges parts splitted with hjsplit"
__config__ = [("activated", "bool", "Activated", "False")]
__threaded__ = ["packageFinished"]
@@ -52,9 +52,9 @@ class MergeFiles(Addon):
files[data["name"][:-4]].sort()
fid_dict[data["name"]] = fid
- download_folder = self.core.config['general']['download_folder']
+ download_folder = self.config['general']['download_folder']
- if self.core.config['general']['folder_per_package']:
+ if self.config['general']['folder_per_package']:
download_folder = save_join(download_folder, pack.folder)
for name, file_list in files.iteritems():