mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
use category in autofork. fixes #306
This commit is contained in:
parent
288e001fb3
commit
205f5d9383
3 changed files with 14 additions and 11 deletions
|
@ -38,9 +38,9 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
|
|||
|
||||
Logger.debug("MAIN: Determined Directory: %s | Name: %s | Category: %s", inputDirectory, inputName, inputCategory)
|
||||
|
||||
sbFork, sbParams = autoFork()
|
||||
|
||||
if inputCategory in sbCategory and sbFork in SICKBEARD_TORRENT and Torrent_NoLink == 1:
|
||||
if inputCategory in sbCategory:
|
||||
sbFork, sbParams = autoFork(inputCategory)
|
||||
if sbFork in SICKBEARD_TORRENT and Torrent_NoLink == 1:
|
||||
Logger.info("MAIN: Calling SickBeard's %s branch to post-process: %s",sbFork ,inputName)
|
||||
result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0))
|
||||
if result == 1:
|
||||
|
|
|
@ -117,7 +117,7 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent = "manual",
|
|||
dirName = SpecificPath
|
||||
|
||||
# auto-detect fork type
|
||||
fork, params = autoFork()
|
||||
fork, params = autoFork(inputCategory)
|
||||
|
||||
if fork not in SICKBEARD_TORRENT or (clientAgent in ['nzbget','sabnzbd'] and nzbExtractionBy != "Destination"):
|
||||
if nzbName:
|
||||
|
|
|
@ -24,10 +24,13 @@ class AuthURLOpener(urllib.FancyURLopener):
|
|||
self.numTries = 0
|
||||
return urllib.FancyURLopener.open(self, url)
|
||||
|
||||
def autoFork():
|
||||
def autoFork(inputCategory = None):
|
||||
|
||||
# config settings
|
||||
section = "SickBeard"
|
||||
if inputCategory != None and config().has_section(inputCategory):
|
||||
section = inputCategory
|
||||
|
||||
host = config().get(section, "host")
|
||||
port = config().get(section, "port")
|
||||
username = config().get(section, "username")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue