Skip to content

Commit

Permalink
Added Sonarr and set default values
Browse files Browse the repository at this point in the history
Update readSettings.py

Sonarr settings, forgot ssl
  • Loading branch information
zybeon committed Feb 10, 2015
1 parent bfcf9bd commit fba282f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion readSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fba282f

Please sign in to comment.