summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RehostTo.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/RehostTo.py')
-rw-r--r--module/plugins/hoster/RehostTo.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 7cde01025..067dd8dbe 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -2,10 +2,10 @@
from urllib import quote, unquote
-from module.plugins.Hoster import Hoster
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-class RehostTo(Hoster):
+class RehostTo(SimpleHoster):
__name__ = "RehostTo"
__type__ = "hoster"
__version__ = "0.13"
@@ -22,23 +22,21 @@ class RehostTo(Hoster):
def setup(self):
- self.chunkLimit = 1
+ self.chunkLimit = 1
self.resumeDownload = True
- def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "rehost.to")
- self.fail(_("No rehost.to account provided"))
-
+ def handleMulti(self):
data = self.account.getAccountInfo(self.user)
long_ses = data['long_ses']
- self.logDebug("Rehost.to: Old URL: %s" % pyfile.url)
-
#raise timeout to 2min
self.req.setOption("timeout", 120)
+ self.link = True
self.download("http://rehost.to/process_download.php",
- get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")},
+ get={'user': "cookie", 'pass': long_ses, 'dl': quote(self.pyfile.url, "")},
disposition=True)
+
+
+getInfo = create_getInfo(RehostTo)