summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/MultiHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 18:59:55 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-01 18:59:55 +0200
commit8d85a655d8cc408574f471306613bc05115c8c64 (patch)
treea468f6fdc525497d94e2bc43e263ac68e676cf4e /module/plugins/internal/MultiHoster.py
parentA lot of plugin code cosmetics (2) (diff)
downloadpyload-8d85a655d8cc408574f471306613bc05115c8c64.tar.xz
Improve Hoster and Crypter + general fixup
Diffstat (limited to 'module/plugins/internal/MultiHoster.py')
-rw-r--r--module/plugins/internal/MultiHoster.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index fbfab1ade..d7d3c5ccd 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,12 +9,14 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
- __version__ = "0.51"
+ __version__ = "0.52"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
- __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
- ("revertfailed", "bool", "Revert to standard download if fails", True)]
+ __config__ = [("use_premium" , "bool", "Use premium account if available" , True),
+ ("fallback_premium", "bool", "Fallback to free download if premium fails", True),
+ ("chk_filesize" , "bool", "Check file size" , True),
+ ("revertfailed" , "bool", "Revert to standard download if fails" , True)]
__description__ = """Multi hoster plugin"""
__license__ = "GPLv3"
@@ -100,7 +102,7 @@ class MultiHoster(SimpleHoster):
except Fail, e: #@TODO: Move to PluginThread in 0.4.10
if self.premium:
self.log_warning(_("Premium download failed"))
- self.restart(nopremium=True)
+ self.restart()
elif self.get_config("revertfailed", True) \
and "new_module" in self.pyload.pluginManager.hosterPlugins[self.__name__]:
@@ -116,7 +118,7 @@ class MultiHoster(SimpleHoster):
hdict['new_module'] = tmp_module
hdict['new_name'] = tmp_name
- self.restart(_("Revert to original hoster plugin"))
+ self.restart(_("Revert to original hoster plugin"), premium=True)
else:
raise Fail(encode(e)) #@TODO: Remove `encode` in 0.4.10