initial link support
This commit is contained in:
1 parent
72cc3576d3
commit
57ae06e139
6 files changed
+129
-1
No files matched your search
@@ -10,6 +10,7 @@ from couchpotato.core.plugins.base import Plugin
|
||||
from couchpotato.core.settings.model import Library, File, Profile, Release, \
|
||||
ReleaseInfo
|
||||
from couchpotato.environment import Env
|
||||
import linktastic.linktastic as linktastic
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
@@ -523,7 +524,12 @@ class Renamer(Plugin):
|
||||
def moveFile(self, old, dest):
|
||||
dest = ss(dest)
|
||||
try:
|
||||
shutil.move(old, dest)
|
||||
if self.conf('hardlink') and not self.conf('symlink'):
|
||||
linktastic.link(old, dest)
|
||||
elif self.conf('symlink') and not self.conf('hardlink'):
|
||||
linktastic.symlink(old, dest)
|
||||
else:
|
||||
shutil.move(old, dest)
|
||||
|
||||
try:
|
||||
os.chmod(dest, Env.getPermission('file'))
|
||||
|
||||
Reference in new issue
Block a user