From b3ba4db00b43f9c47f3f206d490d330a086690c4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 29 May 2013 19:30:40 +0200 Subject: [PATCH 1/3] Append instead of add for subtitle file list --- couchpotato/core/plugins/subtitle/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/subtitle/main.py b/couchpotato/core/plugins/subtitle/main.py index 73ead087..c6bef6ae 100644 --- a/couchpotato/core/plugins/subtitle/main.py +++ b/couchpotato/core/plugins/subtitle/main.py @@ -59,7 +59,7 @@ class Subtitle(Plugin): for d_sub in downloaded: log.info('Found subtitle (%s): %s', (d_sub.language.alpha2, files)) - group['files']['subtitle'].add(d_sub.path) + group['files']['subtitle'].append(d_sub.path) group['subtitle_language'][d_sub.path] = [d_sub.language.alpha2] return True From dc20b68a371b133d3b4b8caecd92f16235e63590 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 31 May 2013 16:32:03 +0200 Subject: [PATCH 2/3] See if need to login on "belongs_to" check. fix #1190 --- couchpotato/core/plugins/release/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index 6618a8be..c409740a 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -180,7 +180,7 @@ class Release(Plugin): provider = fireEvent('provider.belongs_to', item['url'], provider = item.get('provider'), single = True) if item['type'] != 'torrent_magnet': - item['download'] = provider.download + item['download'] = provider.loginDownload if provider.urls.get('login') else provider.download success = fireEvent('searcher.download', data = item, movie = rel.movie.to_dict({ 'profile': {'types': {'quality': {}}}, From 95d146fea2df30fdd1185be6daeddedc4163a542 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 2 Jun 2013 14:22:59 +0200 Subject: [PATCH 3/3] Send referer with scheme --- couchpotato/core/plugins/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 32472cac..2d0d1efa 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -105,13 +105,14 @@ class Plugin(object): if not params: params = {} # Fill in some headers - headers['Referer'] = headers.get('Referer', urlparse(url).hostname) - headers['Host'] = headers.get('Host', urlparse(url).hostname) + parsed_url = urlparse(url) + host = parsed_url.hostname + + headers['Referer'] = headers.get('Referer', '%s://%s' % (parsed_url.scheme, host)) + headers['Host'] = headers.get('Host', host) headers['User-Agent'] = headers.get('User-Agent', self.user_agent) headers['Accept-encoding'] = headers.get('Accept-encoding', 'gzip') - host = urlparse(url).hostname - # Don't try for failed requests if self.http_failed_disabled.get(host, 0) > 0: if self.http_failed_disabled[host] > (time.time() - 900):