summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Core.py2
-rw-r--r--config2
-rwxr-xr-xmodule/network/Request.py11
-rw-r--r--pluginconfig2
-rwxr-xr-xpyMainGui.py22
5 files changed, 16 insertions, 23 deletions
diff --git a/Core.py b/Core.py
index b4761de76..fdec3a084 100644
--- a/Core.py
+++ b/Core.py
@@ -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.de.rw") % newst_version #newer version out
+ print _("new update %s on pyload.org") % newst_version #newer version out
elif CURRENT_VERSION == newst_version:
print _("newst version %s in use:") % CURRENT_VERSION #using newst version
else:
diff --git a/config b/config
index 98201ac97..08a5f3144 100644
--- a/config
+++ b/config
@@ -1,6 +1,6 @@
[general]
#use de or en
-language: de
+language: en
download_folder = Downloads
link_file = links.txt
useReconnect = False
diff --git a/module/network/Request.py b/module/network/Request.py
index 86449a4f2..25eccab87 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -51,7 +51,6 @@ 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):
@@ -90,11 +89,17 @@ 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):
+ def download(self, url, filename, post = {}):
+
+ if post:
+ post = urllib.urlencode(post)
+ else:
+ post = None
+
if not self.dl:
self.dl = True
file = open(filename, 'wb')
- req = urllib2.Request(url)
+ req = urllib2.Request(url, post)
conn = self.downloader.open(req)
self.dl_size = int(conn.headers["content-length"])
self.dl_arrived = 0
diff --git a/pluginconfig b/pluginconfig
index 4a886bcfb..d24101d93 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 10903433c..ed7dfb2c2 100755
--- a/pyMainGui.py
+++ b/pyMainGui.py
@@ -25,10 +25,6 @@ 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):
@@ -74,14 +70,7 @@ class Pyload_Main_Gui(wx.Frame):
wx.Frame.__init__(self, parent, id, title, size=(910, 500))
app_path = dirname(abspath(__file__)) + sep
- # Core
- testLoader = Core()
- if testLoader.config['remote_activated']:
- print _("Server Mode")
- server = ServerThread(testLoader)
- server.start()
-
- # socket
+ # socket
self.socket = ClientSocket(self)
self.socket.connect(('localhost', 7272))
self.socket.sendall("nonsense\n")
@@ -127,8 +116,7 @@ class Pyload_Main_Gui(wx.Frame):
adddownload = _Download_Dialog(None, -1)
result = adddownload.ShowModal()
adddownload.Destroy()
-
-if __name__ == "__main__":
- app = wx.App()
- Pyload_Main_Gui(None,-1)
- app.MainLoop()
+
+app = wx.App()
+Pyload_Main_Gui(None,-1)
+app.MainLoop()