From f94a0a5d7b74ca430a81084d843f0c096c2b4551 Mon Sep 17 00:00:00 2001 From: Jeix Date: Sun, 1 Aug 2010 14:11:19 +0200 Subject: plugin updates to new interface --- module/plugins/hoster/RedtubeCom.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/RedtubeCom.py') diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 6cbd6416e..6a9baffbe 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -9,19 +9,22 @@ class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" __pattern__ = r'http://[\w\.]*?redtube\.com/\d+' - __version__ = "0.1" + __version__ = "0.2" __description__ = """Redtube.com Download Hoster""" __author_name__ = ("jeix") __author_mail__ = ("jeix@hasnomail.de") - def __init__(self, parent): - Hoster.__init__(self, parent) - self.parent = parent - self.html = None + def process(self, pyfile): + self.download_html() + if not self.file_exists(): + offline() + + pyfile.name = self.get_file_name() + self.download(self.get_file_url()) def download_html(self): - url = self.parent.url - self.html = self.req.load(url) + url = self.pyfile.url + self.html = self.load(url) def get_file_url(self): """ returns the absolute downloadable filepath -- cgit v1.2.3