mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
fix when fork not = auto.
This commit is contained in:
parent
3a4fe5223a
commit
6580480382
1 changed files with 15 additions and 11 deletions
|
@ -50,12 +50,10 @@ def autoFork(fork=None):
|
|||
|
||||
try:
|
||||
fork = config.get(section, "fork")
|
||||
if not fork in "auto":
|
||||
fork = fork if fork in SICKBEARD_FAILED or fork in SICKBEARD_TORRENT else fork_default
|
||||
fork = [f for f in forks.iteritems() if f[0] == fork][0]
|
||||
except ConfigParser.NoOptionError:
|
||||
fork = [f for f in forks.iteritems() if f[0] == fork_default][0]
|
||||
fork = "auto"
|
||||
|
||||
if fork in "auto":
|
||||
myOpener = AuthURLOpener(username, password)
|
||||
|
||||
if ssl:
|
||||
|
@ -63,7 +61,6 @@ def autoFork(fork=None):
|
|||
else:
|
||||
protocol = "http://"
|
||||
|
||||
if fork in "auto":
|
||||
Logger.info("Attempting to auto-detect SickBeard fork")
|
||||
for f in forks.iteritems():
|
||||
url = protocol + host + ":" + port + web_root + "/home/postprocess/processEpisode?" + urllib.urlencode(f[1])
|
||||
|
@ -78,5 +75,12 @@ def autoFork(fork=None):
|
|||
# failed to auto-detect fork
|
||||
Logger.info("SickBeard fork auto-detection failed")
|
||||
|
||||
else: #if not fork in "auto"
|
||||
try:
|
||||
fork = fork if fork in SICKBEARD_FAILED or fork in SICKBEARD_TORRENT else fork_default
|
||||
fork = [f for f in forks.iteritems() if f[0] == fork][0]
|
||||
except:
|
||||
fork = [f for f in forks.iteritems() if f[0] == fork_default][0]
|
||||
|
||||
Logger.info("SickBeard fork set to %s", fork[0])
|
||||
return fork[0], fork[1]
|
Loading…
Add table
Add a link
Reference in a new issue