ruud was bulling me ;)

This commit is contained in:
Joel Kåberg
2013-04-05 14:07:10 +02:00
parent 57ae06e139
commit 47ddf31f76
2 changed files with 7 additions and 13 deletions
+5 -11
View File
@@ -113,17 +113,11 @@ config = [{
'description': 'Replace all the spaces with a character. Example: ".", "-" (without quotes). Leave empty to use spaces.',
},
{
'name': 'hardlink',
'type': 'bool',
'description': 'Use <a href="http://en.wikipedia.org/wiki/Hard_link">hard links</a> instead of moving files, ideal for Torrent users. NOTE: From location and to location needs to be on the same drive/partition.',
'default': False,
'advanced': True,
},
{
'name': 'symlink',
'type': 'bool',
'description': 'Use <a href="http://en.wikipedia.org/wiki/Sym_link">sym links</a> instead of moving files.',
'default': False,
'name': 'links',
'default': '0',
'type': 'dropdown',
'values': [('Disable', 0), ('Hard link', 'hard'), ('Sym link', 'sym')],
'description': 'Use <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> instead of moving files, ideal for Torrent users.',
'advanced': True,
},
{
+2 -2
View File
@@ -524,9 +524,9 @@ class Renamer(Plugin):
def moveFile(self, old, dest):
dest = ss(dest)
try:
if self.conf('hardlink') and not self.conf('symlink'):
if self.conf('link') == 'hard':
linktastic.link(old, dest)
elif self.conf('symlink') and not self.conf('hardlink'):
elif self.conf('link') == 'sym':
linktastic.symlink(old, dest)
else:
shutil.move(old, dest)