summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hooks/XFileSharingPro.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hooks/XFileSharingPro.py')
-rw-r--r--pyload/plugins/hooks/XFileSharingPro.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pyload/plugins/hooks/XFileSharingPro.py b/pyload/plugins/hooks/XFileSharingPro.py
index 7478034c6..635d5302b 100644
--- a/pyload/plugins/hooks/XFileSharingPro.py
+++ b/pyload/plugins/hooks/XFileSharingPro.py
@@ -8,7 +8,7 @@ from pyload.plugins.Hook import Hook
class XFileSharingPro(Hook):
__name__ = "XFileSharingPro"
__type__ = "hook"
- __version__ = "0.11"
+ __version__ = "0.12"
__config__ = [("activated", "bool", "Activated", True),
("loadDefault", "bool", "Include default (built-in) hoster list", True),
@@ -23,6 +23,7 @@ class XFileSharingPro(Hook):
def coreReady(self):
self.loadPattern()
+
def loadPattern(self):
hosterList = self.getConfigSet('includeList')
excludeList = self.getConfigSet('excludeList')
@@ -60,18 +61,19 @@ class XFileSharingPro(Hook):
self.unload()
return
- regexp = r"http://(?:[^/]*\.)?(%s)/\w{12}" % ("|".join(sorted(hosterList)).replace('.', '\.'))
- #self.logDebug(regexp)
+ regexp = r"http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}" % ("|".join(sorted(hosterList)).replace('.', '\.'))
dict = self.core.pluginManager.hosterPlugins['XFileSharingPro']
dict['pattern'] = regexp
dict['re'] = re.compile(regexp)
self.logDebug("Pattern loaded - handling %d hosters" % len(hosterList))
+
def getConfigSet(self, option):
s = self.getConfig(option).lower().replace('|', ',').replace(';', ',')
return set([x.strip() for x in s.split(',')])
+
def unload(self):
dict = self.core.pluginManager.hosterPlugins['XFileSharingPro']
dict['pattern'] = r'^unmatchable$'