]> kaliko git repositories - mpd-sima.git/blobdiff - sima/utils/config.py
Fixed prog name
[mpd-sima.git] / sima / utils / config.py
index c11d2e16bb82073dd972f920f5e90e08876b317b..15c1a3dd2ca8c54f5d5769d5bf5fcabac7fc3167 100644 (file)
@@ -53,10 +53,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 +108,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 +118,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 +238,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