diff options
author | mkaay <mkaay@mkaay.de> | 2010-02-08 13:04:21 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-02-08 13:04:21 +0100 |
commit | 9ab155e95db32e03ca6438df12d38500f9d437f9 (patch) | |
tree | cf3ba616032324fc5be9ce572b8f239fec39ac31 /module/Plugin.py | |
parent | FlashGot + ClickNLoad Support + Webif. improvm.!! pyLoad FTW !! (diff) | |
download | pyload-9ab155e95db32e03ca6438df12d38500f9d437f9.tar.xz |
fixed click'n'load, added youtube hd option
Diffstat (limited to 'module/Plugin.py')
-rw-r--r-- | module/Plugin.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/module/Plugin.py b/module/Plugin.py index 5006da8dd..8ee882815 100644 --- a/module/Plugin.py +++ b/module/Plugin.py @@ -115,19 +115,26 @@ class Plugin(): self.req.download(url, location) def set_config(self): - for k, v in self.config: - self.configparser.set(self.props['name'], k, v) + for k, v in self.config.items(): + self.configparser.set(self.props['name'], {"option": k}, v) - def get_config(self, value): + def remove_config(self, option): + self.configparser.remove(self.props['name'], option) + + def get_config(self, value, default=None): self.configparser.loadData() - return self.configparser.get(self.props['name'], value) + return self.configparser.get(self.props['name'], value, default=default) def read_config(self): self.configparser.loadData() try: + self.verify_config() self.config = self.configparser.getConfig()[self.props['name']] except: pass + + def verify_config(self): + pass def init_ocr(self): modul = __import__("module.plugins.captcha." + self.props['name'], fromlist=['captcha']) |