summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-09-01 21:22:43 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-09-01 21:22:43 +0200
commit1903b395f58f429bd04ae3a3a6877f279d82d4ec (patch)
treeed0c2b7e4b2a2658e1411bcaf31701d3229190aa
parentmegaupload.com - first fix (file temporary not available error) (diff)
downloadpyload-1903b395f58f429bd04ae3a3a6877f279d82d4ec.tar.xz
ul.to fix, gui refresh online status
-rw-r--r--module/gui/MainWindow.py15
-rw-r--r--module/plugins/accounts/UploadedTo.py4
-rwxr-xr-xpyLoadCore.py3
-rwxr-xr-xpyLoadGui.py8
4 files changed, 25 insertions, 5 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index ab728a55b..0c8953595 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -238,12 +238,15 @@ class MainWindow(QMainWindow):
self.collectorContext.buttons["remove"] = QAction(QIcon(join(pypath, "icons","remove_small.png")), _("Remove"), self.collectorContext)
self.collectorContext.buttons["push"] = QAction(QIcon(join(pypath, "icons","push_small.png")), _("Push to queue"), self.collectorContext)
self.collectorContext.buttons["edit"] = QAction(QIcon(join(pypath, "icons","edit_small.png")), _("Edit Name"), self.collectorContext)
+ self.collectorContext.buttons["refresh"] = QAction(QIcon(join(pypath, "icons","refresh_small.png")), _("Refresh Status"), self.collectorContext)
self.collectorContext.addAction(self.collectorContext.buttons["push"])
self.collectorContext.addAction(self.collectorContext.buttons["edit"])
self.collectorContext.addAction(self.collectorContext.buttons["remove"])
+ self.collectorContext.addAction(self.collectorContext.buttons["refresh"])
self.connect(self.collectorContext.buttons["remove"], SIGNAL("triggered()"), self.slotRemoveDownload)
self.connect(self.collectorContext.buttons["push"], SIGNAL("triggered()"), self.slotPushPackageToQueue)
self.connect(self.collectorContext.buttons["edit"], SIGNAL("triggered()"), self.slotEditPackage)
+ self.connect(self.collectorContext.buttons["refresh"], SIGNAL("triggered()"), self.slotRefreshPackage)
def slotToggleStatus(self, status):
"""
@@ -424,9 +427,6 @@ class MainWindow(QMainWindow):
for index in smodel.selectedRows(0):
item = index.internalPointer()
self.emit(SIGNAL("restartDownload"), item.id, isinstance(item, Package))
- id, isTopLevel = self.queueContext.item
- if not id is None:
- self.emit(SIGNAL("restartDownload"), id, isTopLevel)
def slotRemoveDownload(self):
"""
@@ -490,6 +490,15 @@ class MainWindow(QMainWindow):
elif index == 3:
self.tabs["settings"]["w"].loadConfig()
+ def slotRefreshPackage(self):
+ smodel = self.tabs["collector"]["package_view"].selectionModel()
+ for index in smodel.selectedRows(0):
+ item = index.internalPointer()
+ pid = item.id
+ if isinstance(item, Link):
+ pid = item.package.id
+ self.emit(SIGNAL("refreshStatus"), pid)
+
class Priorty():
def __init__(self, win):
self.w = win
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index 1311ee809..03def59a9 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -38,7 +38,7 @@ class UploadedTo(Account):
if not data:
raise Exception
req = self.core.requestFactory.getRequest(self.__name__, user)
- html = req.load("http://uploaded.to/", cookies=True)
+ html = req.load("http://ul.to/", cookies=True)
raw_traffic = re.search(r"Traffic left: </span><span class=.*?>(.*?)</span>", html).group(1)
raw_valid = re.search(r"Valid until: </span> <span class=.*?>(.*?)</span>", html).group(1)
traffic = int(self.parseTraffic(raw_traffic))
@@ -52,4 +52,4 @@ class UploadedTo(Account):
def login(self, user, data):
req = self.core.requestFactory.getRequest(self.__name__, user)
- req.load("http://uploaded.to/login", None, { "email" : user, "password" : data["password"]}, cookies=True)
+ req.load("http://ul.to/login", post={ "email" : user, "password" : data["password"]}, cookies=True)
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 17865bfe0..f792b610a 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -597,6 +597,9 @@ class ServerMethods():
def restart_package(self, packid):
self.core.files.restartPackage(int(packid))
+ def recheck_package(self, packid):
+ self.core.files.reCheckPackage(int(packid))
+
def restart_file(self, fileid):
self.core.files.restartFile(int(fileid))
diff --git a/pyLoadGui.py b/pyLoadGui.py
index 981a74ce9..d968528c7 100755
--- a/pyLoadGui.py
+++ b/pyLoadGui.py
@@ -163,6 +163,7 @@ class main(QObject):
self.connect(self.mainWindow, SIGNAL("setClipboardStatus"), self.slotSetClipboardStatus)
self.connect(self.mainWindow, SIGNAL("changePackageName"), self.slotChangePackageName)
self.connect(self.mainWindow, SIGNAL("pullOutPackage"), self.slotPullOutPackage)
+ self.connect(self.mainWindow, SIGNAL("refreshStatus"), self.slotRefreshStatus)
self.connect(self.mainWindow, SIGNAL("setPriority"), self.slotSetPriority)
self.connect(self.mainWindow, SIGNAL("reloadAccounts"), self.slotReloadAccounts)
@@ -512,6 +513,13 @@ class main(QObject):
else:
self.connector.restartFile(id)
+ def slotRefreshStatus(self, id):
+ """
+ emitted from main window
+ refresh download status
+ """
+ self.connector.proxy.recheck_package(id)
+
def slotRemoveDownload(self, id, isPack):
"""
emitted from main window