summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/EasybytezCom.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-03-08 21:07:44 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-03-08 21:07:44 +0100
commit22313b93a8d807e35d6490b8d5f83aea038c8667 (patch)
tree6bc207c544e92f0bd093324273f416e4616295d1 /module/plugins/hooks/EasybytezCom.py
parentAllDebrid plugin by Andy, Voigt; closed #555; generic XFileSharingPro plugin (diff)
downloadpyload-22313b93a8d807e35d6490b8d5f83aea038c8667.tar.xz
multihoster config
Diffstat (limited to 'module/plugins/hooks/EasybytezCom.py')
-rw-r--r--module/plugins/hooks/EasybytezCom.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py
index 4dd39cca6..21a988555 100644
--- a/module/plugins/hooks/EasybytezCom.py
+++ b/module/plugins/hooks/EasybytezCom.py
@@ -11,11 +11,11 @@ def getConfigSet(option):
class EasybytezCom(MultiHoster):
__name__ = "EasybytezCom"
- __version__ = "0.01"
+ __version__ = "0.02"
__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)", "")]
+ ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
+ ("hosterList", "str", "Hoster list (comma separated)", "")]
__description__ = """EasyBytez.com hook plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
@@ -24,9 +24,13 @@ class EasybytezCom(MultiHoster):
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)
+ configMode = self.getConfig('hosterListMode')
+ if configMode in ("listed", "unlisted"):
+ configList = set(self.getConfig('hosterList').strip().lower().replace('|',',').replace(';',',').split(','))
+ configList.discard(u'')
+ if configMode == "listed":
+ hoster &= configList
+ else:
+ hoster -= configList
return list(hoster) \ No newline at end of file