summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-03 12:09:04 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-03 12:09:04 +0100
commit8e921a978e79d93da3036ce3bdc1fb176c74fabb (patch)
tree4f85e170c25e1c482fbfd7ccc59cae0f7d68aaca /module/plugins/internal
parent[CaptchaManager] Custom timeout support (diff)
downloadpyload-8e921a978e79d93da3036ce3bdc1fb176c74fabb.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/MultiHoster.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 3596641b0..24942f8a3 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -16,13 +16,14 @@ class MultiHoster(Hook):
__authors__ = [("pyLoad Team", "admin@pyload.org")]
- replacements = [("2shared.com", "twoshared.com"), ("4shared.com", "fourshared.com"), ("cloudnator.com", "shragle.com"),
- ("ifile.it", "filecloud.io"), ("easy-share.com", "crocko.com"), ("freakshare.net", "freakshare.com"),
- ("hellshare.com", "hellshare.cz"), ("share-rapid.cz", "sharerapid.com"), ("sharerapid.cz", "sharerapid.com"),
- ("ul.to", "uploaded.to"), ("uploaded.net", "uploaded.to"), ("1fichier.com", "onefichier.com")]
- ignored = []
interval = 24 * 60 * 60 #: reload hosters daily
+ HOSTER_REPLACEMENTS = [("2shared.com", "twoshared.com"), ("4shared.com", "fourshared.com"), ("cloudnator.com", "shragle.com"),
+ ("ifile.it", "filecloud.io"), ("easy-share.com", "crocko.com"), ("freakshare.net", "freakshare.com"),
+ ("hellshare.com", "hellshare.cz"), ("share-rapid.cz", "sharerapid.com"), ("sharerapid.cz", "sharerapid.com"),
+ ("ul.to", "uploaded.to"), ("uploaded.net", "uploaded.to"), ("1fichier.com", "onefichier.com")]
+ HOSTER_EXCLUDED = []
+
def setup(self):
self.hosters = []
@@ -42,7 +43,7 @@ class MultiHoster(Hook):
if not self.hosters:
try:
- hosterSet = self.toHosterSet(self.getHoster()) - set(self.ignored)
+ hosterSet = self.toHosterSet(self.getHoster()) - set(self.HOSTER_EXCLUDED)
except Exception, e:
self.logError(e)
return []
@@ -68,7 +69,7 @@ class MultiHoster(Hook):
def toHosterSet(self, hosters):
hosters = set((str(x).strip().lower() for x in hosters))
- for rep in self.replacements:
+ for rep in self.HOSTER_REPLACEMENTS:
if rep[0] in hosters:
hosters.remove(rep[0])
hosters.add(rep[1])