Browse Source

Add File Action Move & Sym link

pull/1642/head
Kyle Klein 12 years ago
committed by Ruud
parent
commit
177063d39c
  1. 2
      couchpotato/core/plugins/renamer/__init__.py
  2. 3
      couchpotato/core/plugins/renamer/main.py

2
couchpotato/core/plugins/renamer/__init__.py

@ -117,7 +117,7 @@ config = [{
'label': 'File Action',
'default': 'move',
'type': 'dropdown',
'values': [('Move', 'move'), ('Copy', 'copy'), ('Hard link', 'hardlink'), ('Sym link', 'symlink')],
'values': [('Move', 'move'), ('Copy', 'copy'), ('Hard link', 'hardlink'), ('Sym link', 'symlink'), ('Move & Sym link', 'move_symlink')],
'description': 'Define which kind of file operation you want to use. Before you start using <a href="http://en.wikipedia.org/wiki/Hard_link">hard links</a> or <a href="http://en.wikipedia.org/wiki/Sym_link">sym links</a>, PLEASE read about their possible drawbacks.',
'advanced': True,
},

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

@ -527,6 +527,9 @@ Remove it if you want it to be renamed (again, or at least let it try again)
symlink(old, dest)
elif self.conf('file_action') == 'copy':
shutil.copy(old, dest)
elif self.conf('file_action') == 'move_symlink':
shutil.move(old, dest)
linktastic.symlink(dest, old)
else:
shutil.move(old, dest)

Loading…
Cancel
Save