diff options
-rw-r--r-- | Core.py | 11 | ||||
-rw-r--r-- | Plugins/Plugin.py | 18 | ||||
-rw-r--r-- | pluginconfig | 4 |
3 files changed, 14 insertions, 19 deletions
@@ -46,7 +46,6 @@ class Core(object): self.check_update() self.config = {} - self.config['plugin_folder'] = "Plugins" self.config['link_file'] = "links.txt" self.plugins_avaible = {} @@ -69,7 +68,6 @@ class Core(object): def read_config(self): """ read config and sets preferences """ - config = ConfigParser.SafeConfigParser() config.read('config') @@ -83,7 +81,6 @@ class Core(object): self.config['log_folder'] = config.get('log', 'logFolder') self.config['reconnectMethod'] = config.get('general', 'reconnectMethod') - def create_plugin_index(self): for file_handler in glob(self.config['plugin_folder'] + sep + '*.py'): if file_handler != self.config['plugin_folder'] + sep + "Plugin.py": @@ -214,9 +211,9 @@ class Core(object): for pyfile in self.thread_list.py_downloading: if pyfile.status.type == 'downloading': print pyfile.status.filename + ": speed is", int(pyfile.status.get_speed()), "kb/s" - print pyfile.status.filename + ": arraives in", int(pyfile.status.get_ETA()), "seconds" + print pyfile.status.filename + ": finished in", int(pyfile.status.get_ETA()), "seconds" elif pyfile.status.type == 'waiting': - print pyfile.status.filename + ": wait", int(pyfile.status.waituntil -time.time()), "seconds" + print pyfile.status.filename + ": wait", int(pyfile.status.waituntil - time.time()), "seconds" def start(self): """ starts the machine @@ -232,7 +229,7 @@ class Core(object): if __name__ == "__main__": testLoader = Core() - server = ServerThread(testLoader) - server.start() + #server = ServerThread(testLoader) + #server.start() testLoader.start() diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index c882c34bb..c941cc0c5 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -12,14 +12,13 @@ class Plugin(): self.parser = ConfigParser.SafeConfigParser() self.config = {} props = {} - props['name'] = "Base Plugin" + props['name'] = "BasePlugin" props['version'] = "0.1" - props['pattern'] = None - props['type'] = "hoster" - props['format'] = "*.py" - props['description'] = """bla""" - props['author'] = "Spoob" - props['author_email'] = "nn@nn.de" + props['pattern'] = None + props['type'] = "hoster" + props['description'] = """Base Plugin""" + props['author_name'] = ("RaNaN", "spoob") + props['author_mail'] = ("RaNaN@pyload.org", "spoob@pyload.org") self.props = props self.parent = parent self.req = Request() @@ -49,7 +48,6 @@ class Plugin(): """ return self.parent.url - def get_file_name(self): return re.findall("([^\/=]+)", self.parent.url)[-1] @@ -73,8 +71,8 @@ class Plugin(): if self.parser.has_section(self.props['name']): for option in self.parser.options(self.props['name']): - self.config[option] = self.parser.get(self.props['name'], option) - self.config[option] = False if self.config[option].lower() == 'false' else self.config[option] + self.config[option] = self.parser.get(self.props['name'], option, raw=True) + self.config[option] = False if self.config[option].lower() == 'false' else self.config[option] def __call__(self): return self.props['name'] diff --git a/pluginconfig b/pluginconfig index 2ddf68df9..4a886bcfb 100644 --- a/pluginconfig +++ b/pluginconfig @@ -1,4 +1,4 @@ [RapidshareCom] premium = False -user = user -pw = pw +username = user +password = pass |