From 7eb1d72333f4d0d5eb1b474ad22f83105c9eb37f Mon Sep 17 00:00:00 2001 From: mano3m <-> Date: Sat, 24 Aug 2013 15:35:20 +0200 Subject: [PATCH 1/2] remove move exception from unrar PR --- couchpotato/core/plugins/renamer/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index 7285076..b73e7dd 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -224,7 +224,7 @@ class Renamer(Plugin): if file_type is 'nfo' and not self.conf('rename_nfo'): log.debug('Skipping, renaming of %s disabled', file_type) for current_file in group['files'][file_type]: - if self.conf('cleanup') and (not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)) or self.fileIsAdded(current_file, group)): + if self.conf('cleanup') and (not self.downloadIsTorrent(download_info) or self.fileIsAdded(current_file, group)): remove_files.append(current_file) continue @@ -410,7 +410,7 @@ class Renamer(Plugin): log.debug('Removing leftover files') for current_file in group['files']['leftover']: if self.conf('cleanup') and not self.conf('move_leftover') and \ - (not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)) or self.fileIsAdded(current_file, group)): + (not self.downloadIsTorrent(download_info) or self.fileIsAdded(current_file, group)): remove_files.append(current_file) # Remove files From c13c0f24e5290ebe418f93262c8c75c87c6082cc Mon Sep 17 00:00:00 2001 From: mano3m <-> Date: Sat, 24 Aug 2013 15:44:34 +0200 Subject: [PATCH 2/2] Change type to protocol in release and renamer --- couchpotato/core/plugins/release/main.py | 2 +- couchpotato/core/plugins/renamer/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index bd66b1a..03b2bec 100644 --- a/couchpotato/core/plugins/release/main.py +++ b/couchpotato/core/plugins/release/main.py @@ -174,7 +174,7 @@ class Release(Plugin): # Get matching provider provider = fireEvent('provider.belongs_to', item['url'], provider = item.get('provider'), single = True) - if item['type'] != 'torrent_magnet': + if item['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({ diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index b73e7dd..39771c8 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -827,13 +827,13 @@ Remove it if you want it to be renamed (again, or at least let it try again) download_info.update({ 'imdb_id': rls.movie.library.identifier, 'quality': rls.quality.identifier, - 'type': rls_dict.get('info', {}).get('type') + 'protocol': rls_dict.get('info', {}).get('protocol') }) return download_info def downloadIsTorrent(self, download_info): - return download_info and download_info.get('type') in ['torrent', 'torrent_magnet'] + return download_info and download_info.get('protocol') in ['torrent', 'torrent_magnet'] def fileIsAdded(self, src, group): if not group or not group.get('before_rename'):