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,8 +40,13 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
for category in categories: for category in categories:
if category == inputCategory: if category == inputCategory:
outputDestination = os.path.normpath(os.path.join(outputDirectory, category, safeName(inputName))) if os.path.basename(inputDirectory) == inputName:
Logger.info("MAIN: Output directory set to: %s", outputDestination) 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 break
else: else:
continue continue

View file

@ -149,6 +149,10 @@ def is_sample(filePath, inputName, minSampleSize):
def copy_link(filePath, targetDirectory, useLink, outputDestination): 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) create_destination(outputDestination)
if useLink == "hard": if useLink == "hard":
try: try:

View file

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