summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/MultiHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-17 23:03:46 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-17 23:03:46 +0100
commit0860e09f5ff16ee3f097f6f9d444f277a38abd72 (patch)
tree29202b0fa114999e4bed45aaabf08ae0e49cc8ce /module/plugins/internal/MultiHoster.py
parent[SimpleHoster] Fix filesize recognition (diff)
downloadpyload-0860e09f5ff16ee3f097f6f9d444f277a38abd72.tar.xz
Extend SimpleHoster in multi-hoster plugins (3)
Diffstat (limited to 'module/plugins/internal/MultiHoster.py')
-rw-r--r--module/plugins/internal/MultiHoster.py41
1 files changed, 23 insertions, 18 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 6d10d17d9..0bcb79817 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,7 +9,7 @@ from module.utils import remove_chars
class MultiHoster(Hook):
__name__ = "MultiHoster"
__type__ = "hook"
- __version__ = "0.21"
+ __version__ = "0.22"
__description__ = """Generic MultiHoster plugin"""
__license__ = "GPLv3"
@@ -18,19 +18,22 @@ class MultiHoster(Hook):
interval = 12 * 60 * 60 #: reload hosters every 12h
- HOSTER_REPLACEMENTS = [("1fichier.com", "onefichier.com"),
- ("2shared.com", "twoshared.com"),
- ("4shared.com", "fourshared.com"),
- ("cloudnator.com", "shragle.com"),
- ("easy-share.com", "crocko.com"),
- ("freakshare.net", "freakshare.com"),
- ("hellshare.com", "hellshare.cz"),
- ("ifile.it", "filecloud.io"),
- ("putlocker.com", "firedrive.com"),
- ("share-rapid.cz", "multishare.cz"),
- ("sharerapid.cz", "multishare.cz"),
- ("ul.to", "uploaded.to"),
- ("uploaded.net", "uploaded.to")]
+ HOSTER_REPLACEMENTS = [("1fichier.com" , "onefichier.com"),
+ ("2shared.com" , "twoshared.com" ),
+ ("4shared.com" , "fourshared.com"),
+ ("cloudnator.com" , "shragle.com" ),
+ ("easy-share.com" , "crocko.com" ),
+ ("fileparadox.com", "fileparadox.in"),
+ ("freakshare.net" , "freakshare.com"),
+ ("hellshare.com" , "hellshare.cz" ),
+ ("ifile.it" , "filecloud.io" ),
+ ("nowdownload.ch" , "nowdownload.sx"),
+ ("nowvideo.co" , "nowvideo.sx" ),
+ ("putlocker.com" , "firedrive.com" ),
+ ("share-rapid.cz" , "multishare.cz" ),
+ ("sharerapid.cz" , "multishare.cz" ),
+ ("ul.to" , "uploaded.to" ),
+ ("uploaded.net" , "uploaded.to" )]
HOSTER_EXCLUDED = []
@@ -133,12 +136,12 @@ class MultiHoster(Hook):
def overridePlugins(self):
- pluginMap = dict((name.lower(), name) for name in self.core.pluginManager.hosterPlugins.keys())
+ pluginMap = dict((name.lower(), name) for name in self.core.pluginManager.hosterPlugins.iterkeys())
accountList = [name.lower() for name, data in self.core.accountManager.accounts.iteritems() if data]
excludedList = []
for hoster in self.getHosterCached():
- name = remove_chars(hoster.lower(), "-.")
+ name = remove_chars(hoster, "-.")
if name in accountList:
excludedList.append(hoster)
@@ -166,10 +169,12 @@ class MultiHoster(Hook):
self.logInfo(_("The following hosters were not overwritten - account exists"), ", ".join(sorted(excludedList)))
if self.new_supported:
- self.logDebug("New Hosters", ", ".join(sorted(self.new_supported)))
+ hosters = sorted(self.new_supported)
+
+ self.logDebug("New Hosters", ", ".join(hosters))
# create new regexp
- regexp = r'.*(%s).*' % "|".join([x.replace(".", "\.") for x in self.new_supported])
+ regexp = r'.*(%s).*' % "|".join([x.replace(".", "\.") for x in hosters])
if hasattr(klass, "__pattern__") and isinstance(klass.__pattern__, basestring) and '://' in klass.__pattern__:
regexp = r'%s|%s' % (klass.__pattern__, regexp)