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/PornhostCom.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/PornhostCom.py') diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py index db256c2ec..5dd681b5b 100644 --- a/module/plugins/hoster/PornhostCom.py +++ b/module/plugins/hoster/PornhostCom.py @@ -8,19 +8,24 @@ class PornhostCom(Hoster): __name__ = "PornhostCom" __type__ = "hoster" __pattern__ = r'http://[\w\.]*?pornhost\.com/([0-9]+/[0-9]+\.html|[0-9]+)' - __version__ = "0.1" + __version__ = "0.2" __description__ = """Pornhost.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()) + + ### old interface 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