added option to move files.

This commit is contained in:
clinton-hall 2013-08-29 21:07:45 +09:30
parent b8e03b1b9d
commit 1ee2b83709
2 changed files with 4 additions and 1 deletions

View file

@ -176,6 +176,9 @@ def copy_link(filePath, targetDirectory, useLink, outputDestination):
Logger.info("COPYLINK: Something went wrong in linktastic.link, copying instead") Logger.info("COPYLINK: Something went wrong in linktastic.link, copying instead")
Logger.debug("COPYLINK: Copying %s to %s", filePath, targetDirectory) Logger.debug("COPYLINK: Copying %s to %s", filePath, targetDirectory)
shutil.copy(filePath, targetDirectory) shutil.copy(filePath, targetDirectory)
elif useLink == "move":
Logger.debug("Moving %s to %s", filePath, targetDirectory)
shutil.move(filePath, targetDirectory)
else: else:
Logger.debug("Copying %s to %s", filePath, targetDirectory) Logger.debug("Copying %s to %s", filePath, targetDirectory)
shutil.copy(filePath, targetDirectory) shutil.copy(filePath, targetDirectory)

View file

@ -77,7 +77,7 @@ web_root =
[Torrent] [Torrent]
###### clientAgent - Supported clients: utorrent, transmission, deluge, other ###### clientAgent - Supported clients: utorrent, transmission, deluge, other
clientAgent = other clientAgent = other
###### useLink - Set to hard for physical links, sym for symbolic links, and no to not use links ###### useLink - Set to hard for physical links, sym for symbolic links, move to move, and no to not use links (copy)
useLink = hard useLink = hard
###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory) ###### outputDirectory - Default output directory (categories will be appended as sub directory to outputDirectory)
outputDirectory = /abs/path/to/complete/ outputDirectory = /abs/path/to/complete/