From 9225aa26ae92a8e70cd204ba98037dc2ac8f6ad0 Mon Sep 17 00:00:00 2001 From: Rato Date: Tue, 17 May 2016 21:23:56 +0200 Subject: [PATCH] Do not remove release group information from base folder --- TorrentToMedia.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 9e831ace..f82b9b10 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -112,7 +112,9 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID, # Incase input is not directory, make sure to create one. # This way Processing is isolated. if not os.path.isdir(os.path.join(inputDirectory, inputName)): - basename = os.path.splitext(core.sanitizeName(inputName))[0] + basename = os.path.basename(inputDirectory) + basename = core.sanitizeName(inputName) \ + if inputName == basename else os.path.splitext(core.sanitizeName(inputName)[0]) outputDestination = os.path.join(core.OUTPUTDIRECTORY, inputCategory, basename) elif uniquePath: outputDestination = os.path.normpath(