X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=sima%2Futils%2Fconfig.py;h=5d62505a972d0f9857d27ac55c53c00559e030b4;hb=7854938788e0af521edd7199e40db796d3256351;hp=c11d2e16bb82073dd972f920f5e90e08876b317b;hpb=e09e76d41b2f041de935e9e884009e3187005ab9;p=mpd-sima.git diff --git a/sima/utils/config.py b/sima/utils/config.py index c11d2e1..5d62505 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -45,6 +45,8 @@ DEFAULT_CONF = { #'password': "", 'port': "6600"}, 'sima': { + 'internal': "Crop, History, MpdOptions, Lastfm, RandomFallBack", + 'contrib': "", 'user_db': "false", 'history_duration': "8", 'queue_length': "1", @@ -53,10 +55,14 @@ DEFAULT_CONF = { 'daemon': "false", 'pidfile': "",}, 'log': { - 'verbosity': "info"}, + 'verbosity': "info", + 'logfile': "", + }, + 'echonest': { + }, 'lastfm': { 'dynamic': "10", - 'similarity': "20", + 'similarity': "15", 'queue_mode': "track", #TODO control values 'single_album': "false", 'track_to_add': "1", @@ -104,6 +110,7 @@ class ConfMan(object): # CONFIG MANAGER CLASS self.init_config() self.control_conf() self.supersedes_config_with_cmd_line_options() + self.config['sima']['db_file'] = self.db_file def get_pw(self): try: @@ -113,11 +120,11 @@ class ConfMan(object): # CONFIG MANAGER CLASS return None except ValueError: # ValueError if password not a boolean, hence an actual password. - pw = self.config.get('MPD', 'password') - if not pw: + pwd = self.config.get('MPD', 'password') + if not pwd: self.log.debug('Password set as an empty string.') return None - return pw + return pwd def control_mod(self): """ @@ -233,7 +240,6 @@ class ConfMan(object): # CONFIG MANAGER CLASS self.db_file = join(data_dir, 'sima.db') config = configparser.SafeConfigParser() - # If no conf file present, uses defaults if not isfile(self.conf_file): self.config = config