diff --git a/couchpotato/core/downloaders/deluge/__init__.py b/couchpotato/core/downloaders/deluge/__init__.py index 4b122b3..c7aa26e 100644 --- a/couchpotato/core/downloaders/deluge/__init__.py +++ b/couchpotato/core/downloaders/deluge/__init__.py @@ -33,12 +33,6 @@ config = [{ 'type': 'password', }, { - 'name': 'paused', - 'type': 'bool', - 'default': False, - 'description': 'Add the torrent paused.', - }, - { 'name': 'directory', 'type': 'directory', 'description': 'Download to this directory. Keep empty for default Deluge download directory.', @@ -70,6 +64,13 @@ config = [{ 'description': 'Also remove the leftover files.', }, { + 'name': 'paused', + 'type': 'bool', + 'advanced': True, + 'default': False, + 'description': 'Add the torrent paused.', + }, + { 'name': 'manual', 'default': 0, 'type': 'bool', diff --git a/couchpotato/core/plugins/release/main.py b/couchpotato/core/plugins/release/main.py index fb2d16b..34668cc 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 82d7428..43e7b5f 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 @@ -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') or rls_dict.get('info', {}).get('type'), }) 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'): diff --git a/libs/synchronousdeluge/__init__.py b/libs/synchronousdeluge/__init__.py index 208e45c..bf5b20f 100644 --- a/libs/synchronousdeluge/__init__.py +++ b/libs/synchronousdeluge/__init__.py @@ -19,6 +19,6 @@ __title__ = "synchronous-deluge" __version__ = "0.1" __author__ = "Christian Dale" -from .synchronousdeluge.client import DelugeClient -from .synchronousdeluge.exceptions import DelugeRPCError +from synchronousdeluge.client import DelugeClient +from synchronousdeluge.exceptions import DelugeRPCError diff --git a/libs/synchronousdeluge/client.py b/libs/synchronousdeluge/client.py index 1b63b0b..98a8084 100644 --- a/libs/synchronousdeluge/client.py +++ b/libs/synchronousdeluge/client.py @@ -3,9 +3,9 @@ import os from collections import defaultdict from itertools import imap -from .synchronousdeluge.exceptions import DelugeRPCError -from .synchronousdeluge.protocol import DelugeRPCRequest, DelugeRPCResponse -from .synchronousdeluge.transfer import DelugeTransfer +from synchronousdeluge.exceptions import DelugeRPCError +from synchronousdeluge.protocol import DelugeRPCRequest, DelugeRPCResponse +from synchronousdeluge.transfer import DelugeTransfer __all__ = ["DelugeClient"]