From 7dbe1dff34e8af45713db07ad72b8327dd907c1d Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 15 Feb 2014 21:06:46 +1030 Subject: [PATCH] send to SickBeard Torrent branch after checking directory structure. fixes #265 --- TorrentToMedia.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 6788bd91..024b9dbc 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -38,18 +38,19 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID): useLink = useLink_in Logger.debug("MAIN: Received Directory: %s | Name: %s | Category: %s", inputDirectory, inputName, inputCategory) - if inputCategory in sbCategory and sbFork in SICKBEARD_TORRENT: - Logger.info("MAIN: Calling SickBeard's %s branch to post-process: %s",sbFork ,inputName) - result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0)) - if result == 1: - Logger.info("MAIN: A problem was reported in the autoProcess* script. If torrent was pasued we will resume seeding") - Logger.info("MAIN: All done.") - sys.exit() inputDirectory, inputName, inputCategory, root = category_search(inputDirectory, inputName, inputCategory, root, categories) # Confirm the category by parsing directory structure Logger.debug("MAIN: Determined Directory: %s | Name: %s | Category: %s", inputDirectory, inputName, inputCategory) + if inputCategory in sbCategory and sbFork in SICKBEARD_TORRENT: + Logger.info("MAIN: Calling SickBeard's %s branch to post-process: %s",sbFork ,inputName) + result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0)) + if result == 1: + Logger.info("MAIN: A problem was reported in the autoProcess* script.") + Logger.info("MAIN: All done.") + sys.exit() + outputDestination = "" for category in categories: if category == inputCategory: