summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-01-05 01:12:23 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-01-05 01:12:23 +0100
commit503cff86eb5e5b902291f5995838f1facd84319c (patch)
tree2ca80269b7b79b2e9e2cf9b771f6673cb4f627b4 /module/plugins/hooks
parentUpdateManager fix (diff)
downloadpyload-503cff86eb5e5b902291f5995838f1facd84319c.tar.xz
merge in plugin updates
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/EasybytezCom.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py
new file mode 100644
index 000000000..4dd39cca6
--- /dev/null
+++ b/module/plugins/hooks/EasybytezCom.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+from module.network.RequestFactory import getURL
+from module.plugins.internal.MultiHoster import MultiHoster
+import re
+
+def getConfigSet(option):
+ s = set(option.lower().replace(',','|').split('|'))
+ s.discard(u'')
+ return s
+
+class EasybytezCom(MultiHoster):
+ __name__ = "EasybytezCom"
+ __version__ = "0.01"
+ __type__ = "hook"
+ __config__ = [("activated", "bool", "Activated", "False"),
+ ("includeHoster", "str", "Use only for downloads from (comma-separated hosters)", ""),
+ ("excludeHoster", "str", "Do not use for downloads from (comma-separated hosters)", "")]
+ __description__ = """EasyBytez.com hook plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ def getHoster(self):
+
+ hoster = set(['2shared.com', 'easy-share.com', 'filefactory.com', 'fileserve.com', 'filesonic.com', 'hotfile.com', 'mediafire.com', 'megaupload.com', 'netload.in', 'rapidshare.com', 'uploading.com', 'wupload.com', 'oron.com', 'uploadstation.com', 'ul.to', 'uploaded.to'])
+
+ option = self.getConfig('includeHoster').strip()
+ if option: hoster &= getConfigSet(option)
+ option = self.getConfig('excludeHoster').strip()
+ if option: hoster -= getConfigSet(option)
+
+ return list(hoster) \ No newline at end of file