DEFAULT_CONF = {
'MPD': {
'host': "localhost",
- 'password': "false",
- 'port': "6600"},
+ #'password': "",
+ 'port': "6600",
+ },
'sima': {
- 'similarity': "15",
- 'dynamic': "10",
- 'queue_mode': "track", #TODO control values
+ 'internal': "Crop, Lastfm, RandomFallBack",
+ 'contrib': "",
'user_db': "false",
'history_duration': "8",
'queue_length': "1",
- 'track_to_add': "1",
- 'album_to_add': "1",
- 'consume': "0",
- 'single_album': "false",
- 'check_new_version':"false",},
+ },
'daemon':{
'daemon': "false",
- 'pidfile': "",},
+ 'pidfile': "",
+ },
'log': {
- 'verbosity': "info"}}
+ 'verbosity': "info",
+ 'logfile': "",
+ },
+ 'echonest': {
+ },
+ 'lastfm': {
+ 'dynamic': "10",
+ 'similarity': "15",
+ '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",
+ }
+ }
#
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:
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):
"""
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