summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExpertDecoders.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-16 17:31:38 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-06-24 22:40:32 +0200
commitc1764e2fea0bb05164c83a876e8cd58b97f58f25 (patch)
treebe1af8dbf5542d93f1cb97f07dd1793fc7acc2df /module/plugins/hooks/ExpertDecoders.py
parent[SimpleHoster] fixurl (diff)
downloadpyload-c1764e2fea0bb05164c83a876e8cd58b97f58f25.tar.xz
Update all
Diffstat (limited to 'module/plugins/hooks/ExpertDecoders.py')
-rw-r--r--module/plugins/hooks/ExpertDecoders.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py
index 13289f8d1..af5f2cfcd 100644
--- a/module/plugins/hooks/ExpertDecoders.py
+++ b/module/plugins/hooks/ExpertDecoders.py
@@ -8,7 +8,7 @@ import uuid
from base64 import b64encode
from module.network.HTTPRequest import BadHeader
-from module.network.RequestFactory import getURL, getRequest
+from module.network.RequestFactory import getRequest
from module.plugins.internal.Hook import Hook, threaded
@@ -36,7 +36,7 @@ class ExpertDecoders(Hook):
def getCredits(self):
- res = getURL(self.API_URL, post={"key": self.getConfig('passkey'), "action": "balance"})
+ res = self.load(self.API_URL, post={"key": self.getConfig('passkey'), "action": "balance"})
if res.isdigit():
self.logInfo(_("%s credits left") % res)
@@ -60,11 +60,12 @@ class ExpertDecoders(Hook):
req.c.setopt(pycurl.LOW_SPEED_TIME, 80)
try:
- result = req.load(self.API_URL,
- post={'action' : "upload",
+ result = self.load(self.API_URL,
+ post={'action' : "upload",
'key' : self.getConfig('passkey'),
'file' : b64encode(data),
- 'gen_task_id': ticket})
+ 'gen_task_id': ticket},
+ req=req)
finally:
req.close()
@@ -95,7 +96,7 @@ class ExpertDecoders(Hook):
if "ticket" in task.data:
try:
- res = getURL(self.API_URL,
+ res = self.load(self.API_URL,
post={'action': "refund", 'key': self.getConfig('passkey'), 'gen_task_id': task.data['ticket']})
self.logInfo(_("Request refund"), res)