diff options
| author | 2012-01-07 23:58:28 +0100 | |
|---|---|---|
| committer | 2012-01-07 23:58:28 +0100 | |
| commit | 6eaa7bb25e2254c80c43fe46166142d590e86c64 (patch) | |
| tree | 103b12d2f8ca59cf84c7511018d99c3cb651839f /module/plugins/MultiHoster.py | |
| parent | xfilesharingpro - fix patterns (diff) | |
| download | pyload-6eaa7bb25e2254c80c43fe46166142d590e86c64.tar.xz | |
some cleanups
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() |
