summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar cp1 <christopherpool1@googlemail.com> 2009-05-31 18:41:48 +0200
committerGravatar cp1 <christopherpool1@googlemail.com> 2009-05-31 18:41:48 +0200
commita78d2e61ec431a0a7b57286ef9db3f94de46230b (patch)
treec6aaf064b856dd1ac60729805bac3839d79c94b0
parentdownload plugin for xup.in added, download works with post data (diff)
downloadpyload-a78d2e61ec431a0a7b57286ef9db3f94de46230b.tar.xz
Backed out changeset 9455bf89f55f made by spoob.
-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, 23 insertions, 16 deletions
diff --git a/Core.py b/Core.py
index fdec3a084..b4761de76 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.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:
diff --git a/config b/config
index 08a5f3144..98201ac97 100644
--- a/config
+++ b/config
@@ -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()