summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/PyFile.pycbin8950 -> 0 bytes
-rw-r--r--module/PyPackage.pycbin3499 -> 0 bytes
-rw-r--r--module/plugins/hooks/IRCInterface.py24
-rw-r--r--module/plugins/hoster/UploadingCom.py6
4 files changed, 28 insertions, 2 deletions
diff --git a/module/PyFile.pyc b/module/PyFile.pyc
deleted file mode 100644
index 1e78c4adb..000000000
--- a/module/PyFile.pyc
+++ /dev/null
Binary files differ
diff --git a/module/PyPackage.pyc b/module/PyPackage.pyc
deleted file mode 100644
index 5943afc31..000000000
--- a/module/PyPackage.pyc
+++ /dev/null
Binary files differ
diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py
index dc868ede9..b65a2e284 100644
--- a/module/plugins/hooks/IRCInterface.py
+++ b/module/plugins/hooks/IRCInterface.py
@@ -340,6 +340,28 @@ class IRCInterface(Thread, Hook):
else:
return ["ERROR: Use del command like this: del <-p|-l> <id> [...] (-p indicates that the ids are from packages, -l indicates that the ids are from links)"]
+ def event_push(self, args):
+ if not args:
+ return ["ERROR: Push package to queue like this: push <package id>"]
+
+ id = int(args[0])
+ if not self.sm.get_package_data(id):
+ return ["ERROR: Package #%d does not exist." % id]
+
+ self.sm.push_package_to_queue(id)
+ return ["INFO: Pushed package %d to queue." % id]
+
+ def event_pull(self, args):
+ if not args:
+ return ["ERROR: Pull package from queue like this: pull <package id>"]
+
+ id = int(args[0])
+ if not self.sm.get_package_data(id):
+ return ["ERROR: Package #%d does not exist." % id]
+
+ self.sm.pull_out_package(id)
+ return ["INFO: Pulled package %d from queue to collector." % id]
+
def event_help(self, args):
lines = []
lines.append("The following commands are available:")
@@ -352,6 +374,8 @@ class IRCInterface(Thread, Hook):
lines.append("more Shows more info when the result was truncated")
lines.append("start Starts all downloads")
lines.append("stop Stops the download (but not abort active downloads)")
+ lines.append("push <id> Push package to queue")
+ lines.append("pull <id> Pull package from queue")
lines.append("status Show general download status")
lines.append("help Shows this help message")
return lines
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py
index 4e3e8a06c..70c54e7ce 100644
--- a/module/plugins/hoster/UploadingCom.py
+++ b/module/plugins/hoster/UploadingCom.py
@@ -6,6 +6,8 @@ from time import time
from module.plugins.Hoster import Hoster
+def timestamp():
+ return int(time()*1000)
class UploadingCom(Hoster):
__name__ = "UploadingCom"
@@ -69,10 +71,10 @@ class UploadingCom(Hoster):
postData['pass'] = 'undefined'
if r'var captcha_src' in self.html[1]:
- captcha_url = "http://uploading.com/general/captcha/download%s/?ts=%d" % (self.fileid, time()*1000)
+ captcha_url = "http://uploading.com/general/captcha/download%s/?ts=%d" % (self.fileid, timestamp())
postData['captcha_code'] = self.decryptCaptcha(captcha_url)
- self.html[2] = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % (time()*1000), post=postData)
+ self.html[2] = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData)
url = re.search(r'"link"\s*:\s*"(.*?)"', self.html[2])
if url:
return url.group(1).replace("\\/", "/")