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 | |
parent | permanent config dir change possible (diff) | |
download | pyload-9d87eee9834078bafc2a95c5d706dfc8d0191dae.tar.xz |
scripts fix, rs fix, closed #127
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 12 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 2 |
2 files changed, 7 insertions, 7 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 diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index bf94e3702..fa5f053de 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -151,9 +151,9 @@ class RapidshareCom(Hoster): self.no_slots = False try: wait_minutes = re.search(r"Or try again in about (\d+) minute", self.html[1]).group(1) - return 60 * int(wait_minutes) + 60 self.no_slots = True self.wantReconnect = True + return 60 * int(wait_minutes) + 60 except: if re.search(r"(Currently a lot of users|no more download slots|servers are overloaded)", self.html[1], re.I) != None: self.log.info(_("Rapidshare: No free slots!")) |