diff --git a/couchpotato/core/media/_base/searcher/main.py b/couchpotato/core/media/_base/searcher/main.py index 89afd756..f09be64b 100644 --- a/couchpotato/core/media/_base/searcher/main.py +++ b/couchpotato/core/media/_base/searcher/main.py @@ -51,6 +51,10 @@ class Searcher(SearcherBase): def download(self, data, movie, manual = False): + if not data.get('protocol'): + data['protocol'] = data['type'] + data['type'] = 'movie' + # Test to see if any downloaders are enabled for this type downloader_enabled = fireEvent('download.enabled', manual, data, single = True) @@ -122,7 +126,7 @@ class Searcher(SearcherBase): return True - log.info('Tried to download, but none of the "%s" downloaders are enabled or gave an error', (data.get('protocol', ''))) + log.info('Tried to download, but none of the "%s" downloaders are enabled or gave an error', (data.get('protocol'))) return False diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 0c023a8e..bd342707 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', data.get('type')) == 'nzb' and 'DOCTYPE nzb' not in filedata and '' not in filedata: + if data.get('protocol') == '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 6916b960..72089cc9 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -182,7 +182,11 @@ class Release(Plugin): # Get matching provider provider = fireEvent('provider.belongs_to', item['url'], provider = item.get('provider'), single = True) - if item.get('protocol', item.get('type')) != 'torrent_magnet': + if not item.get('protocol'): + item['protocol'] = item['type'] + item['type'] = 'movie' + + if item.get('protocol') != '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({