# -*- 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
'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,
'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,
'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.
# 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)