diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-12-19 15:25:50 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-12-19 15:25:50 +0100 |
commit | c521e6445bc8e6b91440813b90d1fdedd76c9721 (patch) | |
tree | 44c6625099b21cace582fb25d3f52368fa503ff0 | |
parent | fixed reconnect (diff) | |
download | pyload-c521e6445bc8e6b91440813b90d1fdedd76c9721.tar.xz |
real reconnect fix ;-)
-rw-r--r-- | module/thread_list.py | 2 | ||||
-rwxr-xr-x | pyLoadCore.py | 23 |
2 files changed, 12 insertions, 13 deletions
diff --git a/module/thread_list.py b/module/thread_list.py index 52d06aae4..6a42898be 100644 --- a/module/thread_list.py +++ b/module/thread_list.py @@ -149,7 +149,7 @@ class Thread_List(object): def init_reconnect(self): """initialise a reonnect""" - if not self.parent.config['general']['use_reconnect'] or self.reconnecting or not self.parent.is_reconnect_time(): + if not self.parent.config['general']['use_reconnect'] or self.reconnecting or not self.parent.server_methods.is_time_reconnect(): return False if not exists(self.parent.config['general']['reconnect_method']): diff --git a/pyLoadCore.py b/pyLoadCore.py index 946df9915..7b7e2754d 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -306,22 +306,11 @@ class Core(object): #~ self.webserver = WebServer(self) #~ if self.config['webinterface']['activated']: #~ self.webserver.start() - - - def is_download_time(self): - start = self.core.config['downloadTime']['start'].split(":") - end = self.core.config['downloadTime']['end'].split(":") - return self.core.compare_time(start, end) - - def is_reconnect_time(self): - start = self.core.config['reconnectTime']['start'].split(":") - end = self.core.config['reconnectTime']['end'].split(":") - return self.compare_time(start, end) - #################################### ########## XMLRPC Methods ########## #################################### + class ServerMethods(): def __init__(self, core): self.core = core @@ -483,6 +472,16 @@ class ServerMethods(): # self.core.file_list.move(id, 1) # self.core.file_list.save() + def is_time_download(self): + start = self.core.config['downloadTime']['start'].split(":") + end = self.core.config['downloadTime']['end'].split(":") + return self.core.compare_time(start, end) + + def is_time_reconnect(self): + start = self.core.config['reconnectTime']['start'].split(":") + end = self.core.config['reconnectTime']['end'].split(":") + return self.compare_time(start, end) + if __name__ == "__main__": pyload_core = Core() try: |