diff options
author | spoob <spoob@gmx.de> | 2009-11-15 23:15:10 +0100 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-11-15 23:15:10 +0100 |
commit | ef9c45e15b9bca642b6b447023dbc9e068ed44fb (patch) | |
tree | 2aa18f18a96cb94482d34d2f5282a68216d7ef56 /module/file_list.py | |
parent | rapidshare plugin fix (diff) | |
download | pyload-ef9c45e15b9bca642b6b447023dbc9e068ed44fb.tar.xz |
fixed non hoster bug
Diffstat (limited to 'module/file_list.py')
-rw-r--r-- | module/file_list.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/module/file_list.py b/module/file_list.py index 244132905..c55ce5bc6 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -25,6 +25,7 @@ from download_thread import Status import cPickle import re from module.remote.RequestObject import RequestObject +import module.Plugin class File_List(object): def __init__(self, core): @@ -153,20 +154,23 @@ class PyLoadFile: self.folder = None self.filename = "filename" self.download_folder = "" - self.modul = __import__(self._get_my_plugin()) - pluginClass = getattr(self.modul, self.modul.__name__) + pluginName = self._get_my_plugin() + if pluginName: + self.modul = __import__(pluginName) + pluginClass = getattr(self.modul, self.modul.__name__) + else: + self.modul = module.Plugin + pluginClass = module.Plugin.Plugin self.plugin = pluginClass(self) self.status = Status(self) - def _get_my_plugin(self): + """ searches the right plugin for an url """ for plugin, plugin_pattern in self.parent.plugins_avaible.items(): if re.match(plugin_pattern, self.url) != None: return plugin - return "Plugin" - def init_download(self): if self.parent.config['proxy']['activated']: |