diff options
Diffstat (limited to 'module/plugins/MultiHoster.py')
-rw-r--r-- | module/plugins/MultiHoster.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/module/plugins/MultiHoster.py b/module/plugins/MultiHoster.py index f7e560c10..047b9155e 100644 --- a/module/plugins/MultiHoster.py +++ b/module/plugins/MultiHoster.py @@ -2,8 +2,14 @@ from time import time +from module.utils import remove_chars + from Account import Account +def normalize(domain): + """ Normalize domain/plugin name, so they are comparable """ + return remove_chars(domain.strip().lower(), "-.") + #noinspection PyUnresolvedReferences class MultiHoster(Account): """ @@ -36,6 +42,15 @@ class MultiHoster(Account): """ raise NotImplementedError + + def isHosterUsuable(self, domain): + """ Determine before downloading if hoster should be used. + + :param domain: domain name + :return: True to let the MultiHoster download, False to fallback to default plugin + """ + return True + def getHosterList(self, force=False): if self.ts + self.hoster_timeout < time() or force: req = self.getAccountRequest() |