summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks')
-rw-r--r--module/plugins/hooks/AntiStandby.py2
-rw-r--r--module/plugins/hooks/ClickNLoad.py10
-rw-r--r--module/plugins/hooks/DownloadScheduler.py8
-rw-r--r--module/plugins/hooks/IRC.py2
-rw-r--r--module/plugins/hooks/MultiHome.py4
-rw-r--r--module/plugins/hooks/TransmissionRPC.py2
-rw-r--r--module/plugins/hooks/XFileSharing.py2
7 files changed, 15 insertions, 15 deletions
diff --git a/module/plugins/hooks/AntiStandby.py b/module/plugins/hooks/AntiStandby.py
index 05f33b397..732405188 100644
--- a/module/plugins/hooks/AntiStandby.py
+++ b/module/plugins/hooks/AntiStandby.py
@@ -162,7 +162,7 @@ class AntiStandby(Addon):
not self.pyload.threadManager.getActiveFiles()):
return
- dl_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get('general', 'download_folder')
if (self.max_mtime(dl_folder) - self.mtime) < self.periodical.interval:
return
diff --git a/module/plugins/hooks/ClickNLoad.py b/module/plugins/hooks/ClickNLoad.py
index 4ac6b507f..ac47d8a68 100644
--- a/module/plugins/hooks/ClickNLoad.py
+++ b/module/plugins/hooks/ClickNLoad.py
@@ -32,14 +32,14 @@ class ClickNLoad(Addon):
def activate(self):
- if not self.pyload.config.get("webinterface", "activated"):
+ if not self.pyload.config.get('webinterface', 'activated'):
return
cnlip = "" if self.config.get('extern') else "127.0.0.1"
cnlport = self.config.get('port')
- webip = "127.0.0.1" if any(_ip == self.pyload.config.get("webinterface", "host") for _ip in ("0.0.0.0", "")) \
- else self.pyload.config.get("webinterface", "host")
- webport = self.pyload.config.get("webinterface", "port")
+ webip = "127.0.0.1" if any(_ip == self.pyload.config.get('webinterface', 'host') for _ip in ("0.0.0.0", "")) \
+ else self.pyload.config.get('webinterface', 'host')
+ webport = self.pyload.config.get('webinterface', 'port')
self.pyload.scheduler.addJob(5, self.proxy, [cnlip, cnlport, webip, webport], threaded=False)
@@ -77,7 +77,7 @@ class ClickNLoad(Addon):
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- if self.pyload.config.get("webinterface", "https"):
+ if self.pyload.config.get('webinterface', 'https'):
try:
server_socket = ssl.wrap_socket(server_socket)
diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py
index d4c0356fd..383150fce 100644
--- a/module/plugins/hooks/DownloadScheduler.py
+++ b/module/plugins/hooks/DownloadScheduler.py
@@ -66,9 +66,9 @@ class DownloadScheduler(Addon):
if speed > 0:
self.log_info(_("Setting download speed to %d kB/s") % speed)
- self.pyload.config.set("download", "limit_speed", 1)
- self.pyload.config.set("download", "max_speed", speed)
+ self.pyload.config.set('download', 'limit_speed', 1)
+ self.pyload.config.set('download', 'max_speed', speed)
else:
self.log_info(_("Setting download speed to FULL"))
- self.pyload.config.set("download", "limit_speed", 0)
- self.pyload.config.set("download", "max_speed", -1)
+ self.pyload.config.set('download', 'limit_speed', 0)
+ self.pyload.config.set('download', 'max_speed', -1)
diff --git a/module/plugins/hooks/IRC.py b/module/plugins/hooks/IRC.py
index 2b7bea5fd..65ae2a356 100644
--- a/module/plugins/hooks/IRC.py
+++ b/module/plugins/hooks/IRC.py
@@ -80,7 +80,7 @@ class IRC(Thread, Notifier):
html = self.load("http://www.freeimagehosting.net/upload.php",
post={'attached': (pycurl.FORM_FILE, task.captchaFile)})
- url = re.search(r"\[img\]([^\[]+)\[/img\]\[/url\]", html).group(1)
+ url = re.search(r'\[img\]([^\[]+)\[/img\]\[/url\]', html).group(1)
self.response(_("New Captcha Request: %s") % url)
self.response(_("Answer with 'c %s text on the captcha'") % task.id)
diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py
index c8c5f4fa7..a7c35c88f 100644
--- a/module/plugins/hooks/MultiHome.py
+++ b/module/plugins/hooks/MultiHome.py
@@ -62,8 +62,8 @@ class MultiHome(Addon):
self.parse_interfaces(self.config.get('interfaces').split(";"))
if not self.interfaces:
- self.parse_interfaces([self.pyload.config.get("download", "interface")])
- self.config.set("interfaces", self.to_config())
+ self.parse_interfaces([self.pyload.config.get('download', 'interface')])
+ self.config.set('interfaces', self.to_config())
def to_config(self):
diff --git a/module/plugins/hooks/TransmissionRPC.py b/module/plugins/hooks/TransmissionRPC.py
index 0e71941ef..457cb8205 100644
--- a/module/plugins/hooks/TransmissionRPC.py
+++ b/module/plugins/hooks/TransmissionRPC.py
@@ -54,7 +54,7 @@ class TransmissionRPC(Addon):
except Exception, e:
if isinstance(e, BadHeader) and e.code == 409:
- headers = dict(re.findall(r"(?P<name>.+?): (?P<value>.+?)\r?\n", req.header))
+ headers = dict(re.findall(r'(?P<name>.+?): (?P<value>.+?)\r?\n', req.header))
session_id = headers['X-Transmission-Session-Id']
req.c.setopt(pycurl.HTTPHEADER, ["X-Transmission-Session-Id: %s" % session_id])
try:
diff --git a/module/plugins/hooks/XFileSharing.py b/module/plugins/hooks/XFileSharing.py
index 3de4d02eb..a3d976d34 100644
--- a/module/plugins/hooks/XFileSharing.py
+++ b/module/plugins/hooks/XFileSharing.py
@@ -60,7 +60,7 @@ class XFileSharing(Addon):
def get_pattern(self, type, plugin):
- if self.config.get("use_%s_list" % type):
+ if self.config.get('use_%s_list' % type):
plugin_list = self.config.get('%s_list' % type)
plugin_list = plugin_list.replace(' ', '').replace('\\', '')
plugin_list = plugin_list.replace('|', ',').replace(';', ',')