Browse Source

Remove 'move' exception

No need to remove files when 'move' is selected as the downloaders do
this themselves now when cleaning up
pull/1966/head
mano3m 12 years ago
parent
commit
695cdea447
  1. 2
      couchpotato/core/downloaders/transmission/__init__.py
  2. 2
      couchpotato/core/downloaders/utorrent/__init__.py
  3. 10
      couchpotato/core/plugins/renamer/main.py

2
couchpotato/core/downloaders/transmission/__init__.py

@ -47,7 +47,7 @@ config = [{
{
'name': 'remove_complete',
'label': 'Remove torrent',
'default': False,
'default': True,
'advanced': True,
'type': 'bool',
'description': 'Remove the torrent from Transmission after it finished seeding.',

2
couchpotato/core/downloaders/utorrent/__init__.py

@ -39,7 +39,7 @@ config = [{
{
'name': 'remove_complete',
'label': 'Remove torrent',
'default': False,
'default': True,
'advanced': True,
'type': 'bool',
'description': 'Remove the torrent from uTorrent after it finished seeding.',

10
couchpotato/core/plugins/renamer/main.py

@ -204,7 +204,7 @@ class Renamer(Plugin):
# Move nfo depending on settings
if file_type is 'nfo' and not self.conf('rename_nfo'):
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]:
remove_files.append(current_file)
continue
@ -387,7 +387,7 @@ class Renamer(Plugin):
# Remove leftover files
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')
for current_file in group['files']['leftover']:
remove_files.append(current_file)
@ -444,8 +444,7 @@ class Renamer(Plugin):
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
if self.movieInFromFolder(movie_folder) and \
self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info):
if self.movieInFromFolder(movie_folder) and self.downloadIsTorrent(download_info):
self.tagDir(group, 'renamed_already')
# Remove matching releases
@ -456,8 +455,7 @@ class Renamer(Plugin):
except:
log.error('Failed removing %s: %s', (release.identifier, traceback.format_exc()))
if group['dirname'] and group['parentdir'] and \
not (self.conf('file_action') != 'move' and self.downloadIsTorrent(download_info)):
if group['dirname'] and group['parentdir'] and not self.downloadIsTorrent(download_info):
try:
log.info('Deleting folder: %s', group['parentdir'])
self.deleteEmptyFolder(group['parentdir'])

Loading…
Cancel
Save