]> kaliko git repositories - mpd-sima.git/blobdiff - sima/utils/config.py
Add missing default config options for Tags
[mpd-sima.git] / sima / utils / config.py
index c7dbab6c4c5e5bc85043b0d6063bb616e5f374db..182b036593a58ada977596653ef7569c20a0fd80 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2009-2015, 2019 kaliko <kaliko@azylum.org>
+# Copyright (c) 2009-2015, 2019-2020 kaliko <kaliko@azylum.org>
 # Copyright (c) 2019 sacha <sachahony@gmail.com>
 #
 #  This file is part of sima
@@ -87,11 +87,21 @@ DEFAULT_CONF = {
             'track_to_add': 1,
             'priority': 50,
             },
+        'tags': {
+            'comment': "",
+            'date': "",
+            'genre': "",
+            'label': "",
+            'originaldate': "",
+            'filter': "",
+            'track_to_add': 1,
+            'priority': 80,
+            }
         }
 #
 
 
-class ConfMan(object):  # CONFIG MANAGER CLASS
+class ConfMan:  # CONFIG MANAGER CLASS
     """
     Configuration manager.
     Default configuration is stored in DEFAULT_CONF dictionnary.
@@ -130,7 +140,7 @@ class ConfMan(object):  # CONFIG MANAGER CLASS
         # Create directories
         data_dir = self.config['sima']['var_dir']
         if not isdir(data_dir):
-            self.log.trace('Creating "{}"'.format(data_dir))
+            self.log.trace('Creating "%s"', data_dir)
             makedirs(data_dir)
             chmod(data_dir, 0o700)
 
@@ -185,7 +195,6 @@ class ConfMan(object):  # CONFIG MANAGER CLASS
         # honor MPD_HOST format as in mpc(1)  for command line option --host
         if self.startopt.get('host'):
             if '@' in self.startopt.get('host'):
-                print(self.startopt.get('host').split('@'))
                 passwd, host = self.startopt.get('host').split('@')
                 self.config.set('MPD', 'password', passwd)
                 self.config.set('MPD', 'host', host)