diff options
author | Stefano <l.stickell@yahoo.it> | 2013-09-15 20:07:09 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-09-15 20:07:09 +0200 |
commit | 511f0e17eb598b078a48a6eac0fdab5438cf539c (patch) | |
tree | 1ec231570dfedb03b4e8be744f112525064a078b /module/plugins | |
parent | Fastshare: fixed premium issue in #253 (diff) | |
parent | Plugins: core.config -> config (diff) | |
download | pyload-511f0e17eb598b078a48a6eac0fdab5438cf539c.tar.xz |
Merge pull request #218 from vuolter/s/plugin/coreconfig
Use config instead core.config for plugins
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/ClickAndLoad.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 10 | ||||
-rw-r--r-- | module/plugins/hooks/MergeFiles.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/ARD.py | 6 |
5 files changed, 17 insertions, 17 deletions
diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index 94185251f..0fc78abfe 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -26,7 +26,7 @@ from module.plugins.Hook import Hook class ClickAndLoad(Hook): __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(Hook): __author_mail__ = ("RaNaN@pyload.de", "mkaay@mkaay.de") def coreReady(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/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 5b7aade94..de8afda5f 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -28,7 +28,7 @@ from module.utils import save_join class ExternalScripts(Hook): __name__ = "ExternalScripts" - __version__ = "0.22" + __version__ = "0.23" __description__ = """Run external scripts""" __config__ = [("activated", "bool", "Activated", "True")] __author_name__ = ("mkaay", "RaNaN", "spoob") @@ -85,12 +85,12 @@ class ExternalScripts(Hook): 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/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 346c37021..2cb546fbb 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -59,7 +59,7 @@ class ExtractArchive(Hook): 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), @@ -303,13 +303,13 @@ class ExtractArchive(Hook): 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/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index 060dae7a2..869b5b6f8 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -30,7 +30,7 @@ BUFFER_SIZE = 4096 class MergeFiles(Hook): __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(Hook): 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(): diff --git a/module/plugins/hoster/ARD.py b/module/plugins/hoster/ARD.py index 4404994b3..12cb6c95a 100644 --- a/module/plugins/hoster/ARD.py +++ b/module/plugins/hoster/ARD.py @@ -40,7 +40,7 @@ class RTMP: class ARD(Hoster): __name__ = "ARD Mediathek" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r"http://www\.ardmediathek\.de/.*" __config__ = [] @@ -67,9 +67,9 @@ class ARD(Hoster): location = save_join(download_folder, pyfile.package().folder) if not os.path.exists(location): - os.makedirs(location, int(self.core.config["permission"]["folder"], 8)) + os.makedirs(location, 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": try: uid = getpwnam(self.config["permission"]["user"])[2] gid = getgrnam(self.config["permission"]["group"])[2] |