diff options
-rw-r--r-- | Core.py | 2 | ||||
-rw-r--r-- | config | 2 | ||||
-rwxr-xr-x | module/network/Request.py | 11 | ||||
-rw-r--r-- | pluginconfig | 2 | ||||
-rwxr-xr-x | pyMainGui.py | 22 |
5 files changed, 23 insertions, 16 deletions
@@ -145,7 +145,7 @@ class Core(object): """ newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip() if CURRENT_VERSION < newst_version: - print _("new update %s on pyload.org") % newst_version #newer version out + print _("new update %s on pyload.de.rw") % newst_version #newer version out elif CURRENT_VERSION == newst_version: print _("newst version %s in use:") % CURRENT_VERSION #using newst version else: @@ -1,6 +1,6 @@ [general] #use de or en -language: en +language: de download_folder = Downloads link_file = links.txt useReconnect = False diff --git a/module/network/Request.py b/module/network/Request.py index 25eccab87..86449a4f2 100755 --- a/module/network/Request.py +++ b/module/network/Request.py @@ -51,6 +51,7 @@ class Request: ("Accept-Encoding","gzip,deflate"), ("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), ("Accept-Charset","ISO-8859-1,utf-8;q=0.7,*;q=0.7")] + def load(self, url, get = {}, post = {}, ref = True): @@ -89,17 +90,11 @@ class Request: #def download(url, filename, reporthook = None, data = None): #default von urlretrieve auch None? # return self.downloader.urlretrieve(url, filename, reporthook, data) - def download(self, url, filename, post = {}): - - if post: - post = urllib.urlencode(post) - else: - post = None - + def download(self, url, filename): if not self.dl: self.dl = True file = open(filename, 'wb') - req = urllib2.Request(url, post) + req = urllib2.Request(url) conn = self.downloader.open(req) self.dl_size = int(conn.headers["content-length"]) self.dl_arrived = 0 diff --git a/pluginconfig b/pluginconfig index d24101d93..4a886bcfb 100644 --- a/pluginconfig +++ b/pluginconfig @@ -1,4 +1,4 @@ [RapidshareCom] premium = False username = user -password = pass +password = pass diff --git a/pyMainGui.py b/pyMainGui.py index ed7dfb2c2..10903433c 100755 --- a/pyMainGui.py +++ b/pyMainGui.py @@ -25,6 +25,10 @@ from os.path import dirname import wx import wx.lib.sized_controls as sized_control from module.remote.ClientSocket import ClientSocket +from Core import Core +#from module.Py_Load_File import PyLoadFile +from module.remote.SocketServer import ServerThread +#from module.thread_list import Thread_List class _Download_Dialog(sized_control.SizedDialog): def __init__(self, parent, id): @@ -70,7 +74,14 @@ class Pyload_Main_Gui(wx.Frame): wx.Frame.__init__(self, parent, id, title, size=(910, 500)) app_path = dirname(abspath(__file__)) + sep - # socket + # Core + testLoader = Core() + if testLoader.config['remote_activated']: + print _("Server Mode") + server = ServerThread(testLoader) + server.start() + + # socket self.socket = ClientSocket(self) self.socket.connect(('localhost', 7272)) self.socket.sendall("nonsense\n") @@ -116,7 +127,8 @@ class Pyload_Main_Gui(wx.Frame): adddownload = _Download_Dialog(None, -1) result = adddownload.ShowModal() adddownload.Destroy() - -app = wx.App() -Pyload_Main_Gui(None,-1) -app.MainLoop() + +if __name__ == "__main__": + app = wx.App() + Pyload_Main_Gui(None,-1) + app.MainLoop() |