summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-17 11:49:15 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-17 11:49:15 +0200
commit5c4b8fe36b6aef655c3d54448741beb9247f044f (patch)
tree4b0d13785be91b2f7c7d9e26facb639e1e1b331a /pyLoadCore.py
parentfile_list saves links, links.txt only for link dumping (diff)
downloadpyload-5c4b8fe36b6aef655c3d54448741beb9247f044f.tar.xz
new server functions
Diffstat (limited to 'pyLoadCore.py')
-rw-r--r--pyLoadCore.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 667cc3473..2f89b9af6 100644
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -67,10 +67,10 @@ class Core(object):
path.append(self.config['plugin_folder'])
self.create_plugin_index()
+ self.init_server()
+
self.file_list = File_List(self)
self.thread_list = Thread_List(self)
-
- self.init_server()
def read_config(self):
""" read config and sets preferences
@@ -216,8 +216,6 @@ class Core(object):
self._test_print_status()
self.server_test()
sleep(2)
- if len(self.thread_list.threads) == 0:
- pass #break
def server_test(self):
obj = RequestObject()
@@ -227,10 +225,20 @@ class Core(object):
self.server.push_all(obj)
def init_server(self):
- print _("Server Mode")
self.server = ServerThread(self)
self.server.start()
+ def kill(self):
+ exit()
+
+ def shutdown(self):
+
+ self.thread_list.pause = True
+
+ while self.thread_list.py_downloading:
+ sleep(1)
+
+ exit()
if __name__ == "__main__":
testLoader = Core()