Remove 'move' exception

No need to remove files when 'move' is selected as the downloaders do
this themselves now when cleaning up
This commit is contained in:
mano3m committed 2013-08-21 20:59:38 +02:00
1 parent d0735a6d58
commit 695cdea447
3 files changed
+6 -8

No files matched your search

@@ -47,7 +47,7 @@ config = [{
{ {
'name': 'remove_complete', 'name': 'remove_complete',
'label': 'Remove torrent', 'label': 'Remove torrent',
'default': False, 'default': True,
'advanced': True, 'advanced': True,
'type': 'bool', 'type': 'bool',
'description': 'Remove the torrent from Transmission after it finished seeding.', 'description': 'Remove the torrent from Transmission after it finished seeding.',
@@ -39,7 +39,7 @@ config = [{
{ {
'name': 'remove_complete', 'name': 'remove_complete',
'label': 'Remove torrent', 'label': 'Remove torrent',
'default': False, 'default': True,
'advanced': True, 'advanced': True,
'type': 'bool', 'type': 'bool',
'description': 'Remove the torrent from uTorrent after it finished seeding.', 'description': 'Remove the torrent from uTorrent after it finished seeding.',
+4 -6
View File
@@ -204,7 +204,7 @@ class Renamer(Plugin):
# Move nfo depending on settings # Move nfo depending on settings
if file_type is 'nfo' and not self.conf('rename_nfo'): if file_type is 'nfo' and not self.conf('rename_nfo'):
log.debug('Skipping, renaming of %s disabled', file_type) log.debug('Skipping, renaming of %s disabled', file_type)
if self.conf('cleanup') and not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)): if self.conf('cleanup') and not self.downloadIsTorrent(download_info):
for current_file in group['files'][file_type]: for current_file in group['files'][file_type]:
remove_files.append(current_file) remove_files.append(current_file)
continue continue
@@ -387,7 +387,7 @@ class Renamer(Plugin):
# Remove leftover files # Remove leftover files
if self.conf('cleanup') and not self.conf('move_leftover') and remove_leftovers and \ if self.conf('cleanup') and not self.conf('move_leftover') and remove_leftovers and \
not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)): not self.downloadIsTorrent(download_info):
log.debug('Removing leftover files') log.debug('Removing leftover files')
for current_file in group['files']['leftover']: for current_file in group['files']['leftover']:
remove_files.append(current_file) remove_files.append(current_file)
@@ -444,8 +444,7 @@ class Renamer(Plugin):
self.tagDir(group, 'failed_rename') self.tagDir(group, 'failed_rename')
# Tag folder if it is in the 'from' folder and it will not be removed because it is a torrent # Tag folder if it is in the 'from' folder and it will not be removed because it is a torrent
if self.movieInFromFolder(movie_folder) and \ if self.movieInFromFolder(movie_folder) and self.downloadIsTorrent(download_info):
self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info):
self.tagDir(group, 'renamed_already') self.tagDir(group, 'renamed_already')
# Remove matching releases # Remove matching releases
@@ -456,8 +455,7 @@ class Renamer(Plugin):
except: except:
log.error('Failed removing %s: %s', (release.identifier, traceback.format_exc())) log.error('Failed removing %s: %s', (release.identifier, traceback.format_exc()))
if group['dirname'] and group['parentdir'] and \ if group['dirname'] and group['parentdir'] and not self.downloadIsTorrent(download_info):
not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)):
try: try:
log.info('Deleting folder: %s', group['parentdir']) log.info('Deleting folder: %s', group['parentdir'])
self.deleteEmptyFolder(group['parentdir']) self.deleteEmptyFolder(group['parentdir'])