]> kaliko git repositories - mpd-sima.git/blobdiff - sima/utils/config.py
Simplified configuration manager (db_file's no longer a special case)
[mpd-sima.git] / sima / utils / config.py
index 06765254da21b24e7d1765921ccfd7181494f2bb..5d79e53a2bbcee6dc34f6fd477f7b79e921f61bf 100644 (file)
@@ -42,7 +42,7 @@ CONF_FILE = 'sima.cfg'
 DEFAULT_CONF = {
         'MPD': {
             'host': "localhost",
-            'password': "false",
+            #'password': "",
             'port': "6600"},
         'sima': {
             'user_db': "false",
@@ -53,15 +53,20 @@ DEFAULT_CONF = {
             'daemon': "false",
             'pidfile': "",},
         'log': {
-            'verbosity': "info"},
+            'verbosity': "info",
+            'logfile': "",},
         'lastfm': {
             'dynamic': "10",
-            'similarity': "18",
+            'similarity': "20",
             'queue_mode': "track", #TODO control values
             'single_album': "false",
             'track_to_add': "1",
             'album_to_add': "1",
             'depth': "1",
+            },
+        'randomfallback': {
+            'flavour': "sensible", # in pure, sensible, genre
+            'track_to_add': "1",
             }
         }
 #
@@ -100,6 +105,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:
@@ -229,7 +235,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