summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZeveraCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/ZeveraCom.py')
-rw-r--r--module/plugins/hoster/ZeveraCom.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index fa2f6edb3..cc55c6955 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
-from module.plugins.Hoster import Hoster
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-class ZeveraCom(Hoster):
+class ZeveraCom(SimpleHoster):
__name__ = "ZeveraCom"
__type__ = "hoster"
__version__ = "0.21"
@@ -21,22 +21,22 @@ class ZeveraCom(Hoster):
self.chunkLimit = 1
- def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "zevera.com")
- self.fail(_("No zevera.com account provided"))
+ def handleMulti(self):
+ if self.account.getAPIData(self.req, cmd="checklink", olink=self.pyfile.url) != "Alive":
+ self.fail(_("Offline or not downloadable"))
- self.logDebug("Old URL: %s" % pyfile.url)
-
- if self.account.getAPIData(self.req, cmd="checklink", olink=pyfile.url) != "Alive":
- self.fail(_("Offline or not downloadable - contact Zevera support"))
-
- header = self.account.getAPIData(self.req, just_header=True, cmd="generatedownloaddirect", olink=pyfile.url)
+ header = self.account.getAPIData(self.req, just_header=True, cmd="generatedownloaddirect", olink=self.pyfile.url)
if not "location" in header:
self.fail(_("Unable to initialize download"))
- self.download(header['location'], disposition=True)
+ self.link = header['location']
+
+ def checkFile(self):
check = self.checkDownload({"error": 'action="ErrorDownload.aspx'})
+
if check == "error":
self.fail(_("Error response received - contact Zevera support"))
+
+
+getInfo = create_getInfo(ZeveraCom)