single file torrent sub directory name changed. fixes #176

This commit is contained in:
clinton-hall 2013-09-10 08:42:54 +09:30
parent 889efcde32
commit ea80cbaf24
3 changed files with 12 additions and 2 deletions

View file

@ -40,7 +40,12 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
for category in categories:
if category == inputCategory:
if os.path.basename(inputDirectory) == inputName:
Logger.info("MAIN: Download is a directory")
outputDestination = os.path.normpath(os.path.join(outputDirectory, category, safeName(inputName)))
else:
Logger.info("MAIN: Download is not a directory")
outputDestination = os.path.normpath(os.path.join(outputDirectory, category, os.path.splitext(safeName(inputName))[0]))
Logger.info("MAIN: Output directory set to: %s", outputDestination)
break
else:

View file

@ -149,6 +149,10 @@ def is_sample(filePath, inputName, minSampleSize):
def copy_link(filePath, targetDirectory, useLink, outputDestination):
if os.path.isfile(targetDirectory):
Logger.info("COPYLINK: target file already exists. Nothing to be done")
return True
create_destination(outputDestination)
if useLink == "hard":
try:

View file

@ -6,6 +6,7 @@ Impacts Torrents
Don't include 720p or 1080p as parts for extracting.
Extracts all sub-folders.
Added option to Move files.
Fix for single file torrents linked to subfolder of same name.
Impacts All
Added option for SickBeard delay (for forks that use 1 minute check.