summaryrefslogtreecommitdiff
path: root/src/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.py')
-rw-r--r--src/config.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/config.py b/src/config.py
index 4191c4d..0c4916d 100644
--- a/src/config.py
+++ b/src/config.py
@@ -2,15 +2,26 @@ import configparser
class Config:
"""
- A cconfig reader class.
+ A config reader class.
"""
def __init__(self, config_file):
self._parser = configparser.ConfigParser()
self._parser.read(config_file)
- def get_server_config(self):
- host = self._parser['Server']['host']
- version = self._parser['Server']['api_version']
+ # Mumble config
+ def get_mumble_config(self, ):
+ host = self._parser['MumbleServer']['host']
+ password = self._parser['MumbleServer']['password']
+ certfile = self._parser['MumbleServer']['certfile']
+ keyfile = self._parser['MumbleServer']['keyfile']
+ name = self._parser['MumbleServer']['name']
+
+ return (host, password, certfile, keyfile, name)
+
+ # Ampache config
+ def get_ampache_config(self):
+ host = self._parser['AmpacheServer']['host']
+ version = self._parser['AmpacheServer']['api_version']
return (host, version)
@@ -20,8 +31,8 @@ class Config:
return auth
def get_directories(self):
- download = self._parser['Directories']['download_folder']
- delete_after_playing = bool(self._parser['Directories']
+ download = self._parser['Misc']['download_folder']
+ delete_after_playing = bool(self._parser['Misc']
['delete_after_playing'])
return (download, delete_after_playing)