Browse Source

Only allow single redirect for now

fix #3931
pull/4201/head
Ruud 11 years ago
parent
commit
70ca31a265
  1. 2
      couchpotato/core/plugins/base.py
  2. 5
      couchpotato/runner.py

2
couchpotato/core/plugins/base.py

@ -222,7 +222,7 @@ class Plugin(object):
'timeout': timeout,
'files': files,
'verify': False, #verify_ssl, Disable for now as to many wrongly implemented certificates..
'stream': stream
'stream': stream,
}
method = 'post' if len(data) > 0 or files else 'get'

5
couchpotato/runner.py

@ -151,12 +151,15 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
if not os.path.exists(python_cache):
os.mkdir(python_cache)
session = requests.Session()
session.max_redirects = 1
# Register environment settings
Env.set('app_dir', sp(base_path))
Env.set('data_dir', sp(data_dir))
Env.set('log_path', sp(os.path.join(log_dir, 'CouchPotato.log')))
Env.set('db', db)
Env.set('http_opener', requests.Session())
Env.set('http_opener', session)
Env.set('cache_dir', cache_dir)
Env.set('cache', FileSystemCache(python_cache))
Env.set('console_log', options.console_log)

Loading…
Cancel
Save