diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-15 21:03:55 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-15 21:03:55 +0200 |
commit | 9d87eee9834078bafc2a95c5d706dfc8d0191dae (patch) | |
tree | d623e514f43561fcb37c2b13f270c06edfdfb07c /module/plugins/hooks/ExternalScripts.py | |
parent | permanent config dir change possible (diff) | |
download | pyload-9d87eee9834078bafc2a95c5d706dfc8d0191dae.tar.xz |
scripts fix, rs fix, closed #127
Diffstat (limited to 'module/plugins/hooks/ExternalScripts.py')
-rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index a876618c3..a3ed2f168 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -68,7 +68,8 @@ class ExternalScripts(Hook): def downloadStarts(self, pyfile): for script in self.scripts['download_preparing']: try: - out = subprocess.Popen([join(self.folder, 'download_preparing', script), pyfile.plugin.props['name'], pyfile.url], stdout=subprocess.PIPE) + cmd = [join(self.folder, 'download_preparing', script), pyfile.pluginname, pyfile.url] + out = subprocess.Popen(cmd, stdout=subprocess.PIPE) out.wait() except: pass @@ -76,19 +77,18 @@ class ExternalScripts(Hook): def downloadFinished(self, pyfile): for script in self.scripts['download_finished']: try: - out = subprocess.Popen([join(self.folder, 'download_finished', script), pyfile.plugin.__name__, pyfile.url, pyfile.name, \ - join(self.core.config['general']['download_folder'], pyfile.package().folder, pyfile.name)], stdout=subprocess.PIPE) + out = subprocess.Popen([join(self.folder, 'download_finished', script), pyfile.pluginname, pyfile.url, pyfile.name, join(self.core.config['general']['download_folder'], pyfile.package().folder, pyfile.name)], stdout=subprocess.PIPE) except: pass def packageFinished(self, pypack): for script in self.scripts['package_finished']: folder = self.core.config['general']['download_folder'] - if pypack.data["package_name"] != (self.core.config['general']['link_file']) and self.core.xmlconfig.get("general", "folder_per_package", False): - folder = join(folder.decode(sys.getfilesystemencoding()), pypack.data["package_name"].decode(sys.getfilesystemencoding())) + if self.core.config.get("general", "folder_per_package"): + folder = join(folder.decode(sys.getfilesystemencoding()), pypack.folder.decode(sys.getfilesystemencoding())) try: - out = subprocess.Popen([join(self.folder, 'package_finished', script), pypack.data['package_name'], folder], stdout=subprocess.PIPE) + out = subprocess.Popen([join(self.folder, 'package_finished', script), pypack.name, folder], stdout=subprocess.PIPE) except: pass |