From 117b952455c15abe272d7985ed814dbd8e11d62a Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 5 Sep 2013 21:46:00 +0200 Subject: [PATCH] Default back to type on protocol. fix #2120 --- couchpotato/core/plugins/base.py | 2 +- couchpotato/core/plugins/release/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index bd342707..0c023a8e 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -295,7 +295,7 @@ class Plugin(object): def createFileName(self, data, filedata, movie): name = os.path.join(self.createNzbName(data, movie)) - if data.get('protocol') == 'nzb' and 'DOCTYPE nzb' not in filedata and '' not in filedata: + if data.get('protocol', data.get('type')) == 'nzb' and 'DOCTYPE nzb' not in filedata and '' not in filedata: return '%s.%s' % (name, 'rar') return '%s.%s' % (name, data.get('protocol')) diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index eb60728d..6916b960 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -182,7 +182,7 @@ class Release(Plugin): # Get matching provider provider = fireEvent('provider.belongs_to', item['url'], provider = item.get('provider'), single = True) - if item['protocol'] != 'torrent_magnet': + if item.get('protocol', item.get('type')) != 'torrent_magnet': item['download'] = provider.loginDownload if provider.urls.get('login') else provider.download success = fireEvent('searcher.download', data = item, movie = rel.movie.to_dict({