summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/hooks/CaptchaBrotherhood.py2
-rw-r--r--module/plugins/hooks/ExternalScripts.py2
-rw-r--r--module/plugins/hooks/ExtractArchive.py2
-rw-r--r--module/plugins/hooks/TransmissionRPC.py4
-rw-r--r--module/plugins/internal/SimpleHoster.py1
-rw-r--r--module/plugins/internal/utils.py4
6 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py
index 5411322de..5334c1c5b 100644
--- a/module/plugins/hooks/CaptchaBrotherhood.py
+++ b/module/plugins/hooks/CaptchaBrotherhood.py
@@ -155,7 +155,7 @@ class CaptchaBrotherhood(Addon):
def captcha_invalid(self, task):
if task.data['service'] is self.classname and "ticket" in task.data:
- res = self.api_response("complainCaptcha", task.data['ticket'])
+ self.api_response("complainCaptcha", task.data['ticket'])
@threaded
diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py
index 6a11f8c6a..9fd22e0af 100644
--- a/module/plugins/hooks/ExternalScripts.py
+++ b/module/plugins/hooks/ExternalScripts.py
@@ -176,7 +176,7 @@ class ExternalScripts(Addon):
else:
dl_folder = self.pyload.config.get("general", "download_folder")
- args = [pack.id, pack.name, dl_folder, pack.password]
+ args = [pypack.id, pack.name, dl_folder, pack.password]
self._call("package_deleted", args)
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py
index 93107810c..c001000c8 100644
--- a/module/plugins/hooks/ExtractArchive.py
+++ b/module/plugins/hooks/ExtractArchive.py
@@ -169,7 +169,7 @@ class ExtractArchive(Addon):
@threaded
def extract_queued(self, thread):
- if self.extracting: #@NOTE: doing the check here for safty (called by coreReady)
+ if self.extracting: #@NOTE: doing the check here for safety (called by coreReady)
return
self.extracting = True
diff --git a/module/plugins/hooks/TransmissionRPC.py b/module/plugins/hooks/TransmissionRPC.py
index da4ea1fc5..7914d5c44 100644
--- a/module/plugins/hooks/TransmissionRPC.py
+++ b/module/plugins/hooks/TransmissionRPC.py
@@ -14,7 +14,7 @@ from module.plugins.internal.Addon import Addon
class TransmissionRPC(Addon):
__name__ = "TransmissionRPC"
__type__ = "hook"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__pattern__ = r"https?://.+\.torrent|magnet:\?.+"
@@ -53,7 +53,7 @@ class TransmissionRPC(Addon):
req=req)
except Exception, e:
- if req.code == 409:
+ if isinstance(e, BadHeader) and e.code == 409:
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])
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index b434c55ae..7821218ae 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -2,7 +2,6 @@
from __future__ import with_statement
-import os
import re
import time
diff --git a/module/plugins/internal/utils.py b/module/plugins/internal/utils.py
index 723690f39..3a3ada07d 100644
--- a/module/plugins/internal/utils.py
+++ b/module/plugins/internal/utils.py
@@ -162,8 +162,8 @@ def encode(value, encoding=None, decoding=None):
if type(value) is unicode:
res = value.encode(encoding or "utf-8")
- elif type(value) is str:
- res = encode(decode(value, decoding), encoding)
+ #elif type(value) is str:
+ #res = encode(decode(value, decoding), encoding)
else:
res = str(value)