From fba282f273c424519424b60a066bcc4cc9ede260 Mon Sep 17 00:00:00 2001 From: zybeon Date: Mon, 9 Feb 2015 13:22:38 -0500 Subject: [PATCH] Added Sonarr and set default values Update readSettings.py Sonarr settings, forgot ssl --- readSettings.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/readSettings.py b/readSettings.py index 783267ac..91cb5a45 100644 --- a/readSettings.py +++ b/readSettings.py @@ -63,6 +63,12 @@ def __init__(self, directory, filename): 'delete_failed': 'False', 'ssl': 'False', 'web_root': ''} + # Default settings for Sonarr + sonarr_defaults = {'host': 'localhost', + 'port': '8989', + 'apikey': '', + 'ssl': 'False', + 'web_root': ''} # Default uTorrent settings utorrent_defaults = { 'label': '', 'webui': 'False', @@ -72,7 +78,7 @@ def __init__(self, directory, filename): 'username': '', 'password': ''} - defaults = {'SickBeard': sb_defaults, 'CouchPotato': cp_defaults, 'MP4': mp4_defaults, 'uTorrent': utorrent_defaults} + defaults = {'SickBeard': sb_defaults, 'CouchPotato': cp_defaults, 'Sonarr': sonarr_defaults, 'MP4': mp4_defaults, 'uTorrent': utorrent_defaults} write = False # Will be changed to true if a value is missing from the config file and needs to be written config = ConfigParser.SafeConfigParser() @@ -296,6 +302,15 @@ def __init__(self, directory, filename): if self.uTorrentLabel == "": self.uTorrentLabel = None; + #Read relevant Sonarr section information + section = "Sonarr" + self.Sonarr = {} + self.Sonarr['host'] = config.get(section, "host") + self.Sonarr['port'] = config.get(section, "port") + self.Sonarr['apikey'] = config.get(section, "apikey") + self.Sonarr['ssl'] = config.get(section, "ssl") + self.Sonarr['web_root'] = config.get(section, "web_root") + #Pass the values on self.config = config self.configFile = configFile