mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
parent
bb3febaa9c
commit
dd6440dc71
5 changed files with 25 additions and 6 deletions
|
@ -105,6 +105,10 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputC
|
||||||
nzbExtractionBy = config.get(section, "nzbExtractionBy")
|
nzbExtractionBy = config.get(section, "nzbExtractionBy")
|
||||||
except (ConfigParser.NoOptionError, ValueError):
|
except (ConfigParser.NoOptionError, ValueError):
|
||||||
nzbExtractionBy = "Downloader"
|
nzbExtractionBy = "Downloader"
|
||||||
|
try:
|
||||||
|
process_method = config.get(section, "process_method")
|
||||||
|
except ConfigParser.NoOptionError:
|
||||||
|
process_method = None
|
||||||
|
|
||||||
TimeOut = 60 * int(wait_for) # SickBeard needs to complete all moving and renaming before returning the log sequence via url.
|
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.
|
socket.setdefaulttimeout(int(TimeOut)) #initialize socket timeout.
|
||||||
|
@ -151,23 +155,27 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputC
|
||||||
if watch_dir != "" and (not host in ['localhost', '127.0.0.1'] or nzbName == "Manual Run"):
|
if watch_dir != "" and (not host in ['localhost', '127.0.0.1'] or nzbName == "Manual Run"):
|
||||||
dirName = watch_dir
|
dirName = watch_dir
|
||||||
|
|
||||||
|
# don't have sickbeard display any output
|
||||||
params['quiet'] = 1
|
params['quiet'] = 1
|
||||||
|
|
||||||
for param in copy.copy(params):
|
for param in copy.copy(params):
|
||||||
if param is "failed":
|
if param is "failed":
|
||||||
params["failed"] = failed
|
params[param] = failed
|
||||||
|
|
||||||
if param is "dirName":
|
if param is "dirName":
|
||||||
params["dirName"] = dirName
|
params[param] = dirName
|
||||||
|
|
||||||
if param is "dir":
|
if param is "dir":
|
||||||
params["dir"] = dirName
|
params[param] = dirName
|
||||||
|
|
||||||
if param is "process":
|
if param is "process":
|
||||||
params["process"] = None
|
params["process"] = None
|
||||||
|
|
||||||
if param is "process_method":
|
if param is "process_method":
|
||||||
params["process_method"] = None
|
if process_method:
|
||||||
|
params[param] = process_method
|
||||||
|
else:
|
||||||
|
del params[param]
|
||||||
|
|
||||||
if nzbName != None:
|
if nzbName != None:
|
||||||
params['nzbName'] = nzbName
|
params['nzbName'] = nzbName
|
||||||
|
|
|
@ -305,8 +305,8 @@ def addnzbget():
|
||||||
|
|
||||||
|
|
||||||
section = "SickBeard"
|
section = "SickBeard"
|
||||||
envKeys = ['CATEGORY', 'HOST', 'PORT', 'USERNAME', 'PASSWORD', 'SSL', 'WEB_ROOT', 'WATCH_DIR', 'FORK', 'DELETE_FAILED', 'DELAY', 'WAIT_FOR']
|
envKeys = ['CATEGORY', 'HOST', 'PORT', 'USERNAME', 'PASSWORD', 'SSL', 'WEB_ROOT', 'WATCH_DIR', 'FORK', 'DELETE_FAILED', 'DELAY', 'WAIT_FOR', 'PROCESS_METHOD']
|
||||||
cfgKeys = ['sbCategory', 'host', 'port', 'username', 'password', 'ssl', 'web_root', 'watch_dir', 'fork', 'delete_failed', 'delay', 'wait_for']
|
cfgKeys = ['sbCategory', 'host', 'port', 'username', 'password', 'ssl', 'web_root', 'watch_dir', 'fork', 'delete_failed', 'delay', 'wait_for', 'process_method']
|
||||||
for index in range(len(envKeys)):
|
for index in range(len(envKeys)):
|
||||||
key = 'NZBPO_SB' + envKeys[index]
|
key = 'NZBPO_SB' + envKeys[index]
|
||||||
if os.environ.has_key(key):
|
if os.environ.has_key(key):
|
||||||
|
|
|
@ -37,6 +37,7 @@ fork = auto
|
||||||
delete_failed = 0
|
delete_failed = 0
|
||||||
nzbExtractionBy = Downloader
|
nzbExtractionBy = Downloader
|
||||||
Torrent_ForceLink = 1
|
Torrent_ForceLink = 1
|
||||||
|
process_method =
|
||||||
|
|
||||||
|
|
||||||
[HeadPhones]
|
[HeadPhones]
|
||||||
|
|
|
@ -117,6 +117,11 @@
|
||||||
# set to 1 to delete failed, or 0 to leave files in place.
|
# set to 1 to delete failed, or 0 to leave files in place.
|
||||||
#sbdelete_failed=0
|
#sbdelete_failed=0
|
||||||
|
|
||||||
|
# SickBeard process method.
|
||||||
|
#
|
||||||
|
# set this to move, copy, hardlin, symlink as appropriate if you want to over-ride SB defaults. Leave blank to use SB default.
|
||||||
|
#sbprocess_method=
|
||||||
|
|
||||||
## HeadPhones
|
## HeadPhones
|
||||||
|
|
||||||
# HeadPhones script category.
|
# HeadPhones script category.
|
||||||
|
|
|
@ -66,6 +66,11 @@
|
||||||
# set to 1 to delete failed, or 0 to leave files in place.
|
# set to 1 to delete failed, or 0 to leave files in place.
|
||||||
#sbdelete_failed=0
|
#sbdelete_failed=0
|
||||||
|
|
||||||
|
# SickBeard process method.
|
||||||
|
#
|
||||||
|
# set this to move, copy, hardlin, symlink as appropriate if you want to over-ride SB defaults. Leave blank to use SB default.
|
||||||
|
#sbprocess_method=
|
||||||
|
|
||||||
## Extensions
|
## Extensions
|
||||||
|
|
||||||
# Media Extensions
|
# Media Extensions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue