summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/UserAgentSwitcher.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-07 01:23:55 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-07 01:23:55 +0200
commitb1759bc440cd6013837697eb8de540914f693ffd (patch)
treed170caf63d7f65e44d23ea2d91a65759a1665928 /module/plugins/hooks/UserAgentSwitcher.py
parent[Plugin] Fix decoding in load method (diff)
downloadpyload-b1759bc440cd6013837697eb8de540914f693ffd.tar.xz
No camelCase style anymore
Diffstat (limited to 'module/plugins/hooks/UserAgentSwitcher.py')
-rw-r--r--module/plugins/hooks/UserAgentSwitcher.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py
index ea2d84a43..fdfe4b673 100644
--- a/module/plugins/hooks/UserAgentSwitcher.py
+++ b/module/plugins/hooks/UserAgentSwitcher.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hook import Hook
class UserAgentSwitcher(Hook):
__name__ = "UserAgentSwitcher"
__type__ = "hook"
- __version__ = "0.09"
+ __version__ = "0.10"
__config__ = [("activated" , "bool", "Activated" , True ),
("connecttimeout", "int" , "Connection timeout in seconds" , 60 ),
@@ -28,9 +28,9 @@ class UserAgentSwitcher(Hook):
def download_preparing(self, pyfile):
- connecttimeout = self.getConfig('connecttimeout')
- maxredirs = self.getConfig('maxredirs')
- useragent = self.getConfig('useragent')
+ connecttimeout = self.get_config('connecttimeout')
+ maxredirs = self.get_config('maxredirs')
+ useragent = self.get_config('useragent')
if connecttimeout:
pyfile.plugin.req.http.c.setopt(pycurl.CONNECTTIMEOUT, connecttimeout)
@@ -39,5 +39,5 @@ class UserAgentSwitcher(Hook):
pyfile.plugin.req.http.c.setopt(pycurl.MAXREDIRS, maxredirs)
if useragent:
- self.logDebug("Use custom user-agent string: " + useragent)
+ self.log_debug("Use custom user-agent string: " + useragent)
pyfile.plugin.req.http.c.setopt(pycurl.USERAGENT, useragent)