From 8c342ae1ef82090b7bd36c54fcb25763bc5e0984 Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 16 Nov 2009 17:00:10 +0100 Subject: bump --- pyLoadCore.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index c4c5dd9f0..d84353902 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -405,3 +405,4 @@ if __name__ == "__main__": testLoader = Core() testLoader.start() + -- cgit v1.2.3 From f22b9cebe1f800127658f94b9e4c9b9b2481c59e Mon Sep 17 00:00:00 2001 From: spoob Date: Mon, 16 Nov 2009 20:28:33 +0100 Subject: Fixed DLC Plugin --- pyLoadCore.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index d84353902..94a57aa70 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -147,10 +147,13 @@ class Core(object): for file_handler in glob(self.plugin_folder + sep + '*.py') + glob(self.plugin_folder + sep + 'DLC.pyc'): plugin_pattern = "" plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') - for line in open(file_handler, "r").readlines(): - if "props['pattern']" in line: - plugin_pattern = line.split("r\"")[1].split("\"")[0] - break + if plugin_file == "DLC": + plugin_pattern = "(?!http://).*\.dlc" + else: + for line in open(file_handler, "r").readlines(): + if "props['pattern']" in line: + plugin_pattern = line.split("r\"")[1].split("\"")[0] + break if plugin_pattern != "": self.plugins_avaible[plugin_file] = plugin_pattern self.logger.debug(plugin_file + _(" added")) -- cgit v1.2.3 From 5d04894e73a52e69968cb4a4bfd9a581cd2fb86c Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 1 Feb 2010 18:54:19 +0100 Subject: new update system for remote clients --- pyLoadCore.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 7aa38b9b1..dbc9dc1cd 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -59,6 +59,7 @@ from module.network.Request import Request import module.remote.SecureXMLRPCServer as Server from module.thread_list import Thread_List from module.web.ServerThread import WebServer +from module.PullEvents import PullManager class Core(object): """ pyLoad Core """ @@ -138,7 +139,8 @@ class Core(object): self.lastGuiConnected = 0 self.server_methods = ServerMethods(self) - self.file_list = File_List(self) + self.file_list = File_List(self) + self.pullManager = PullManager(self) self.thread_list = Thread_List(self) self.captchaManager = CaptchaManager(self) @@ -571,7 +573,10 @@ class ServerMethods(): return True else: return False - + + def get_events(self, uuid): + return self.core.pullManager.getEvents(uuid) + #def move_urls_up(self, ids): # for id in ids: # self.core.file_list.move(id) -- cgit v1.2.3 From 129e50b8db2387f88a169e7d50e64cfb83651d8c Mon Sep 17 00:00:00 2001 From: spoob Date: Tue, 2 Feb 2010 13:27:08 +0100 Subject: Fixed time compare again in default --- pyLoadCore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index dbc9dc1cd..98f525534 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -312,7 +312,7 @@ class Core(object): if start == end: return True - now = time.localtime()[3:5] + now = list(time.localtime()[3:5]) if start < now and end > now: return True elif start > end and (now > start or now < end): return True elif start < now and end < now and start > end: return True -- cgit v1.2.3 From dc97a68f74dc0966b1df9e8f8231d76ecd9f2673 Mon Sep 17 00:00:00 2001 From: mkaay Date: Tue, 2 Feb 2010 22:15:48 +0100 Subject: some gui fixes, i18n update --- pyLoadCore.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index dbc9dc1cd..9df831aed 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -108,12 +108,12 @@ class Core(object): translation = gettext.translation("pyLoad", join(self.path, "locale"), languages=[self.config['general']['language']]) translation.install(unicode=True) - self.check_install("Crypto", "pycrypto to decode container files") - self.check_install("Image", "Python Image Libary (PIL) for captha reading") - self.check_install("pycurl", "pycurl for lower memory footprint while downloading") - self.check_install("django", "Django for webinterface") - self.check_install("tesseract", "tesseract for captcha reading", False) - self.check_install("gocr", "gocr for captcha reading", False) + self.check_install("Crypto", _("pycrypto to decode container files")) + self.check_install("Image", _("Python Image Libary (PIL) for captha reading")) + self.check_install("pycurl", _("pycurl for lower memory footprint while downloading")) + self.check_install("django", _("Django for webinterface")) + self.check_install("tesseract", _("tesseract for captcha reading"), False) + self.check_install("gocr", _("gocr for captcha reading"), False) self.check_file(self.config['log']['log_folder'], _("folder for logs"), True) self.check_file(self.config['general']['download_folder'], _("folder for downloads"), True) @@ -121,7 +121,7 @@ class Core(object): self.check_file(self.config['general']['failed_file'], _("file for failed links")) if self.config['ssl']['activated']: - self.check_install("OpenSSL", "OpenSSL for secure connection", True) + self.check_install("OpenSSL", _("OpenSSL for secure connection"), True) self.check_file(self.config['ssl']['cert'], _("ssl certificate"), False, True) self.check_file(self.config['ssl']['key'], _("ssl key"), False, True) @@ -176,11 +176,11 @@ class Core(object): while True: sleep(2) if self.do_restart: - self.logger.info("restarting pyLoad") + self.logger.info(_("restarting pyLoad")) self.restart() if self.do_kill: self.shutdown() - self.logger.info("pyLoad quits") + self.logger.info(_("pyLoad quits")) exit() if self.last_update_check + self.update_check_interval <= time.time(): self.update_available = self.check_update() @@ -191,16 +191,16 @@ class Core(object): usermap = {self.config['remote']['username']: self.config['remote']['password']} if self.config['ssl']['activated']: self.server = Server.SecureXMLRPCServer(server_addr, self.config['ssl']['cert'], self.config['ssl']['key'], usermap) - self.logger.info("Secure XMLRPC Server Started") + self.logger.info(_("Secure XMLRPC Server Started")) else: self.server = Server.AuthXMLRPCServer(server_addr, usermap) - self.logger.info("Auth XMLRPC Server Started") + self.logger.info(_("Auth XMLRPC Server Started")) self.server.register_instance(self.server_methods) thread.start_new_thread(self.server.serve_forever, ()) except Exception, e: - self.logger.error("Failed starting socket server, CLI and GUI will not be available: %s" % str(e)) + self.logger.error(_("Failed starting XMLRPC server CLI and GUI will not be available: %s") % str(e)) if self.config['general']['debug_mode']: import traceback traceback.print_exc() @@ -302,7 +302,7 @@ class Core(object): break if plugin_pattern != "": self.plugins_avaible[plugin_file] = plugin_pattern - self.logger.debug(plugin_file + _(" added")) + self.logger.debug(_("%s added") % plugin_file) self.logger.info(_("created index of plugins")) def compare_time(self, start, end): @@ -322,7 +322,7 @@ class Core(object): return self.downloadSpeedLimit def shutdown(self): - self.logger.info("shutting down...") + self.logger.info(_("shutting down...")) if self.config['webinterface']['activated']: self.webserver.quit() self.webserver.join() @@ -338,10 +338,10 @@ class Core(object): if self.config['updates']['search_updates']: version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, )) if version_check == "": - self.logger.info("No Updates for pyLoad") + self.logger.info(_("No Updates for pyLoad")) return False else: - self.logger.info("New pyLoad Version %s available" % version_check) + self.logger.info(_("New pyLoad Version %s available") % version_check) return True else: return False @@ -366,7 +366,7 @@ class Core(object): __import__("module.Unzip", globals(), locals(), "Unzip", -1).Unzip().extract(tmp_zip_name, "Test/") return True except: - self.logger.info("Auto install Failed") + self.logger.info(_("Auto install Failed")) return False else: return False @@ -604,5 +604,5 @@ if __name__ == "__main__": pyload_core.start() except KeyboardInterrupt: pyload_core.shutdown() - pyload_core.logger.info("killed pyLoad from Terminal") + pyload_core.logger.info(_("killed pyLoad from Terminal")) exit() -- cgit v1.2.3