From ff41f484a256316ed3fd8595c6857d393b0e426d Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 15 Feb 2014 08:03:14 +1030 Subject: [PATCH] added option for nzbExtractionBy. fixes #265 --- autoProcess/autoProcessTV.py | 6 +++++- autoProcessMedia.cfg.sample | 1 + changelog.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/autoProcess/autoProcessTV.py b/autoProcess/autoProcessTV.py index 68d52905..70662e97 100644 --- a/autoProcess/autoProcessTV.py +++ b/autoProcess/autoProcessTV.py @@ -104,6 +104,10 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputC SampleIDs = (config.get("Extensions", "SampleIDs")).split(',') except (ConfigParser.NoOptionError, ValueError): SampleIDs = ['sample','-s.'] + try: + nzbExtractionBy = config.get("section", "nzbExtractionBy") + except (ConfigParser.NoOptionError, ValueError): + nzbExtractionBy = "Downloader" TimeOut = 60 * int(wait_for) # SickBeard needs to complete all moving and renaming before returning the log sequence via url. socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout. @@ -120,7 +124,7 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputC SICKBEARD_TORRENT_USE = SICKBEARD_TORRENT - if clientAgent in ['nzbget','sabnzbd']: #Assume Torrent actions (unrar and link) don't happen. We need to check for valid media here. + if clientAgent in ['nzbget','sabnzbd'] and not nzbExtractionBy == "Destination": #Assume Torrent actions (unrar and link) don't happen. We need to check for valid media here. SICKBEARD_TORRENT_USE = [] if not fork in SICKBEARD_TORRENT_USE: diff --git a/autoProcessMedia.cfg.sample b/autoProcessMedia.cfg.sample index ccfe178e..c08a1357 100644 --- a/autoProcessMedia.cfg.sample +++ b/autoProcessMedia.cfg.sample @@ -35,6 +35,7 @@ wait_for = 5 watch_dir = fork = default delete_failed = 0 +nzbExtractionBy = Downloader [HeadPhones] diff --git a/changelog.txt b/changelog.txt index 42a9896c..c80961b4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,7 +11,7 @@ Added list of common sample ids and a way to set deletion of All media files les Impacts NZBs Fix Error with manual run of nzbToMedia Make sure SickBeard receives the individula download dir. -Disabled SickBeard Torrent handling for NZBs. Fixes failed handling of nzbs that fail to extract. +Added option to set SickBeard extraction as either Downlaoder or Destination (SickBEard). Impacts Torrents Added option to run userscript once only (on directory).