]> kaliko git repositories - mpd-sima.git/blobdiff - sima/utils/config.py
Default config definition more consistent
[mpd-sima.git] / sima / utils / config.py
index 2778422369aee46c1ae139a2926fd7e0f43510ae..616a01f5bf16d26cac971d97b352cf5dd2138698 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2009-2015, 2019-2020 kaliko <kaliko@azylum.org>
+# Copyright (c) 2009-2015, 2019-2021 kaliko <kaliko@azylum.org>
 # Copyright (c) 2019 sacha <sachahony@gmail.com>
 #
 #  This file is part of sima
@@ -49,14 +49,14 @@ DEFAULT_CONF = {
         'sima': {
             'internal': "Crop, Lastfm, Random",
             'contrib': "",
-            'user_db': "false",
+            'user_db': False,
             'history_duration': 8,
             'queue_length': 2,
             'var_dir': 'empty',
-            'musicbrainzid': "true",
-            'repeat_disable_queue': "true",
-            'single_disable_queue': "true",
-            'mopidy_compat': "false",
+            'musicbrainzid': True,
+            'repeat_disable_queue': True,
+            'single_disable_queue': True,
+            'mopidy_compat': False,
             },
         'daemon': {
             'daemon': False,
@@ -73,7 +73,7 @@ DEFAULT_CONF = {
         'lastfm': {
             'queue_mode': "track",  # TODO control values
             'max_art': 10,
-            'single_album': "false",
+            'single_album': False,
             'track_to_add': 1,
             'album_to_add': 1,
             'shuffle_album': False,
@@ -87,11 +87,31 @@ DEFAULT_CONF = {
             'track_to_add': 1,
             'priority': 50,
             },
+        'tags': {
+            'comment': "",
+            'date': "",
+            'genre': "",
+            'label': "",
+            'originaldate': "",
+            'filter': "",
+            'queue_mode': "track",
+            'single_album': False,
+            'track_to_add': 1,
+            'album_to_add': 1,
+            'priority': 80,
+            },
+        'genre': {
+            'queue_mode': "track",
+            'single_album': False,
+            'track_to_add': 1,
+            'album_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.
@@ -185,7 +205,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)