mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 19:40:03 -07:00
Added watch_dir
Allows this script to be run on a different PC to the Sickbeard Server. The directory structure will most probably not match in this case, so we specify a default watch directory in the config. This directory should be the location that completed TV episodes are placed by sabnzbd or nzbget, as mounted on the SickBeard Server.
This commit is contained in:
parent
71808201d8
commit
82d27fa744
1 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,7 @@ def processEpisode(dirName, nzbName=None, status=0):
|
|||
print "Could not read configuration file: ", str(e)
|
||||
sys.exit(1)
|
||||
|
||||
watch_dir = ""
|
||||
host = config.get("SickBeard", "host")
|
||||
port = config.get("SickBeard", "port")
|
||||
username = config.get("SickBeard", "username")
|
||||
|
@ -73,12 +74,21 @@ def processEpisode(dirName, nzbName=None, status=0):
|
|||
web_root = config.get("SickBeard", "web_root")
|
||||
except ConfigParser.NoOptionError:
|
||||
web_root = ""
|
||||
|
||||
try:
|
||||
watch_dir = config.get("SickBeard", "watch_dir")
|
||||
except ConfigParser.NoOptionError:
|
||||
watch_dir = ""
|
||||
|
||||
try:
|
||||
failed_fork = int(config.get("SickBeard", "failed_fork"))
|
||||
except (ConfigParser.NoOptionError, ValueError):
|
||||
failed_fork = 0
|
||||
|
||||
#allows us to specify the default watch directory and call the postproecssing on another PC with different directory structure.
|
||||
if watch_dir != "":
|
||||
dirName = watch_dir
|
||||
|
||||
params = {}
|
||||
|
||||
params['quiet'] = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue