diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-17 11:49:15 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-17 11:49:15 +0200 |
commit | 5c4b8fe36b6aef655c3d54448741beb9247f044f (patch) | |
tree | 4b0d13785be91b2f7c7d9e26facb639e1e1b331a /module/file_list.py | |
parent | file_list saves links, links.txt only for link dumping (diff) | |
download | pyload-5c4b8fe36b6aef655c3d54448741beb9247f044f.tar.xz |
new server functions
Diffstat (limited to 'module/file_list.py')
-rw-r--r-- | module/file_list.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/module/file_list.py b/module/file_list.py index fe4080807..3a1c866dc 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -22,6 +22,7 @@ LIST_VERSION = 1 import cPickle from Py_Load_File import PyLoadFile +from module.remote.RequestObject import RequestObject class File_List(object): def __init__(self, core): @@ -67,6 +68,8 @@ class File_List(object): output = open('links.pkl', 'wb') cPickle.dump(self.data, output, -1) + self.inform_client() + def load(self): try: pkl_file = open('links.pkl', 'rb') @@ -83,6 +86,12 @@ class File_List(object): self.core.logger.info("Links loaded: "+ str(int(len(obj) - 1))) + def inform_client(self): + obj = RequestObject() + obj.command = "file_list" + obj.data = self.data + + self.core.server.push_all(obj) class Data(): def __init__(self, url): |