ruud was bulling me ;)
This commit is contained in:
1 parent
57ae06e139
commit
47ddf31f76
2 files changed
+7
-13
No files matched your search
@@ -113,17 +113,11 @@ config = [{
|
|||||||
'description': 'Replace all the spaces with a character. Example: ".", "-" (without quotes). Leave empty to use spaces.',
|
'description': 'Replace all the spaces with a character. Example: ".", "-" (without quotes). Leave empty to use spaces.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'hardlink',
|
'name': 'links',
|
||||||
'type': 'bool',
|
'default': '0',
|
||||||
'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.',
|
'type': 'dropdown',
|
||||||
'default': False,
|
'values': [('Disable', 0), ('Hard link', 'hard'), ('Sym link', 'sym')],
|
||||||
'advanced': True,
|
'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.',
|
||||||
},
|
|
||||||
{
|
|
||||||
'name': 'symlink',
|
|
||||||
'type': 'bool',
|
|
||||||
'description': 'Use <a href="http://en.wikipedia.org/wiki/Sym_link">sym links</a> instead of moving files.',
|
|
||||||
'default': False,
|
|
||||||
'advanced': True,
|
'advanced': True,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -524,9 +524,9 @@ class Renamer(Plugin):
|
|||||||
def moveFile(self, old, dest):
|
def moveFile(self, old, dest):
|
||||||
dest = ss(dest)
|
dest = ss(dest)
|
||||||
try:
|
try:
|
||||||
if self.conf('hardlink') and not self.conf('symlink'):
|
if self.conf('link') == 'hard':
|
||||||
linktastic.link(old, dest)
|
linktastic.link(old, dest)
|
||||||
elif self.conf('symlink') and not self.conf('hardlink'):
|
elif self.conf('link') == 'sym':
|
||||||
linktastic.symlink(old, dest)
|
linktastic.symlink(old, dest)
|
||||||
else:
|
else:
|
||||||
shutil.move(old, dest)
|
shutil.move(old, dest)
|
||||||
|
|||||||
Reference in new issue
Block a user