diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 3dd7580a..9fdbd587 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -142,7 +142,11 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID, inputFiles = core.listMediaFiles(inputDirectory, archives=False, other=True, otherext=extensions) else: inputFiles = core.listMediaFiles(inputDirectory, other=True, otherext=extensions) - logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory)) + if len(inputFiles) == 0 and os.path.isfile(inputDirectory): + inputFiles = [inputDirectory] + logger.debug("Found 1 file to process: {0}".format(inputDirectory)) + else: + logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory)) for inputFile in inputFiles: filePath = os.path.dirname(inputFile) fileName, fileExt = os.path.splitext(os.path.basename(inputFile))