diff options
Diffstat (limited to 'module/plugins/hooks/JustPremium.py')
-rw-r--r-- | module/plugins/hooks/JustPremium.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/hooks/JustPremium.py b/module/plugins/hooks/JustPremium.py index 19a552e49..706de4d81 100644 --- a/module/plugins/hooks/JustPremium.py +++ b/module/plugins/hooks/JustPremium.py @@ -8,7 +8,7 @@ from module.plugins.internal.Hook import Hook class JustPremium(Hook): __name__ = "JustPremium" __type__ = "hook" - __version__ = "0.23" + __version__ = "0.24" __config__ = [("excluded", "str", "Exclude hosters (comma separated)", ""), ("included", "str", "Include hosters (comma separated)", "")] @@ -25,10 +25,10 @@ class JustPremium(Hook): def setup(self): self.info = {} #@TODO: Remove in 0.4.10 - self.event_list = ["linksAdded"] + self.event_map = {'linksAdded': "links_added"} - def linksAdded(self, links, pid): + def links_added(self, links, pid): hosterdict = self.core.pluginManager.hosterPlugins linkdict = self.core.api.checkURLs(links) @@ -39,9 +39,9 @@ class JustPremium(Hook): and hosterdict[hoster]['new_name'] in premiumplugins) excluded = map(lambda domain: "".join(part.capitalize() for part in re.split(r'(\.|\d+)', domain) if part != '.'), - self.getConfig('excluded').replace(' ', '').replace(',', '|').replace(';', '|').split('|')) + self.get_config('excluded').replace(' ', '').replace(',', '|').replace(';', '|').split('|')) included = map(lambda domain: "".join(part.capitalize() for part in re.split(r'(\.|\d+)', domain) if part != '.'), - self.getConfig('included').replace(' ', '').replace(',', '|').replace(';', '|').split('|')) + self.get_config('included').replace(' ', '').replace(',', '|').replace(';', '|').split('|')) hosterlist = (premiumplugins | multihosters).union(excluded).difference(included) @@ -50,7 +50,7 @@ class JustPremium(Hook): return for pluginname in set(linkdict.keys()) - hosterlist: - self.logInfo(_("Remove links of plugin: %s") % pluginname) + self.log_info(_("Remove links of plugin: %s") % pluginname) for link in linkdict[pluginname]: - self.logDebug("Remove link: %s" % link) + self.log_debug("Remove link: %s" % link) links.remove(link) |