diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-08 23:40:17 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-08 23:40:17 +0100 |
commit | e977be3c78ea9d976e9b2338244b214a4b3a5199 (patch) | |
tree | 77f1f8990ba33bfa0592fd1b1b223a91235519aa /module/plugins/hooks/SmoozedCom.py | |
parent | "New Year" Update: crypter plugins (diff) | |
download | pyload-e977be3c78ea9d976e9b2338244b214a4b3a5199.tar.xz |
"New Year" Update: hook plugins
Diffstat (limited to 'module/plugins/hooks/SmoozedCom.py')
-rw-r--r-- | module/plugins/hooks/SmoozedCom.py | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/module/plugins/hooks/SmoozedCom.py b/module/plugins/hooks/SmoozedCom.py index 0aff36c0f..4e706c959 100644 --- a/module/plugins/hooks/SmoozedCom.py +++ b/module/plugins/hooks/SmoozedCom.py @@ -6,38 +6,21 @@ from module.plugins.internal.MultiHook import MultiHook class SmoozedCom(MultiHook): __name__ = "SmoozedCom" __type__ = "hook" - __version__ = "0.01" + __version__ = "0.02" - __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), - ("hosterList", "str", "Hoster list (comma separated)", ""), - ("unloadFailing", "bool", "Revert to stanard download if download fails", False), - ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), + ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ), + ("revertfailed" , "bool" , "Revert to standard download if fails", True ), + ("retry" , "int" , "Number of retries before revert" , 10 ), + ("retryinterval" , "int" , "Retry interval in minutes" , 1 ), + ("reload" , "bool" , "Reload plugin list" , True ), + ("reloadinterval", "int" , "Reload interval in hours" , 12 )] __description__ = """Smoozed.com hook plugin""" __license__ = "GPLv3" - __authors__ = [] + __authors__ = [("", "")] def getHosters(self): - # If no accounts are available there will be no hosters available - if not self.account or not self.account.canUse(): - return [] - - # Get account data - (user, data) = self.account.selectAccount() - account_info = self.account.getAccountInfo(user, True) - - # Return hoster list - return account_info["hoster"] - - - def coreReady(self): - # Get account plugin and check if there is a valid account available - self.account = self.core.accountManager.getAccountPlugin("SmoozedCom") - if not self.account.canUse(): - self.account = None - self.logError(_("Please add a valid premiumize.me account first and restart pyLoad")) - return - - # Run the overwriten core ready which actually enables the multihook hook - return MultiHook.coreReady(self) + user, data = self.account.selectAccount() + return self.account.getAccountData(user)["hosters"] |