summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2011-06-30 18:15:35 +0200
committerGravatar Jeix <devnull@localhost> 2011-06-30 18:15:35 +0200
commite0a3cdbefd3218d5d0453dd401230c79f9bc8035 (patch)
tree1cfe7da0c0ee90c45ef4ec1cf6824e54ecdb7b2d
parentlittle thrift fixes, some new methods stubs (diff)
downloadpyload-e0a3cdbefd3218d5d0453dd401230c79f9bc8035.tar.xz
fixed #336 megavideo
-rw-r--r--module/PluginThread.py12
-rw-r--r--module/plugins/Plugin.py1
-rw-r--r--module/plugins/hoster/MegavideoCom.py17
3 files changed, 19 insertions, 11 deletions
diff --git a/module/PluginThread.py b/module/PluginThread.py
index 5f311aa07..1cb1dd8ea 100644
--- a/module/PluginThread.py
+++ b/module/PluginThread.py
@@ -153,13 +153,13 @@ class DownloadThread(PluginThread):
self.m.core.hookManager.downloadStarts(pyfile)
pyfile.plugin.preprocessing(self)
- except NotImplementedError:
+ # except NotImplementedError:
- self.m.log.error(_("Plugin %s is missing a function.") % pyfile.pluginname)
- pyfile.setStatus("failed")
- pyfile.error = "Plugin does not work"
- self.clean(pyfile)
- continue
+ # self.m.log.error(_("Plugin %s is missing a function.") % pyfile.pluginname)
+ # pyfile.setStatus("failed")
+ # pyfile.error = "Plugin does not work"
+ # self.clean(pyfile)
+ # continue
except Abort:
try:
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 9caf4d81a..2ed83a64a 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -159,6 +159,7 @@ class Plugin(object):
#----------------------------------------------------------------------
def process(self, pyfile):
"""the 'main' method of every plugin, you **have to** overwrite it"""
+ print "mmh:("
raise NotImplementedError
def resetAccount(self):
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py
index e4b41605b..fa5d87993 100644
--- a/module/plugins/hoster/MegavideoCom.py
+++ b/module/plugins/hoster/MegavideoCom.py
@@ -10,18 +10,25 @@ class MegavideoCom(Hoster):
__name__ = "MegavideoCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?megavideo.com/\?v=.*"
- __version__ = "0.1"
+ __version__ = "0.2"
__description__ = """Megavideo.com Download Hoster"""
__author_name__ = ("jeix","mkaay")
__author_mail__ = ("jeix@hasnomail.de","mkaay@mkaay.de")
- def __init__(self, parent):
- Hoster.__init__(self, parent)
- self.parent = parent
+ def setup(self):
self.html = None
+ def process(self, pyfile):
+ self.pyfile = pyfile
+
+ if not self.file_exists():
+ self.offline()
+
+ self.pyfile.name = self.get_file_name()
+ self.download( self.get_file_url() )
+
def download_html(self):
- url = self.parent.url
+ url = self.pyfile.url
self.html = self.req.load(url)
def get_file_url(self):