X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sima%2Futils%2Fconfig.py;h=168938a01efb12e7d2cc767c6220de401c896981;hb=43d74856c79bcbeb403638cf4637aa9679eab25c;hp=0e775ecc54d5c1294daebdc643b1250fe3037d0f;hpb=1481a05d7060c8cfd615850b3df9d66a52fb0ff4;p=mpd-sima.git diff --git a/sima/utils/config.py b/sima/utils/config.py index 0e775ec..168938a 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -46,7 +46,7 @@ DEFAULT_CONF = { 'port': 6600, }, 'sima': { - 'internal': "Crop, Lastfm, RandomFallBack", + 'internal': "Crop, Lastfm, Random", 'contrib': "", 'user_db': "false", 'history_duration': 8, @@ -64,6 +64,7 @@ DEFAULT_CONF = { }, 'crop': { 'consume': 10, + 'priority': 0, }, 'echonest': { 'queue_mode': "track", #TODO control values @@ -72,6 +73,7 @@ DEFAULT_CONF = { 'track_to_add': 1, 'album_to_add': 1, 'depth': 1, + 'priority': 100, }, 'lastfm': { 'queue_mode': "track", #TODO control values @@ -81,11 +83,13 @@ DEFAULT_CONF = { 'album_to_add': 1, 'depth': 1, 'cache': True, + 'priority': 100, }, - 'randomfallback': { + 'random': { 'flavour': "sensible", # in pure, sensible 'track_to_add': 1, - } + 'priority': 50, + }, } # @@ -133,8 +137,8 @@ class ConfMan(object): # CONFIG MANAGER CLASS argparse. """ ok = True - for op, ftochk in [('log', self.config['log']['logfile']), - ('pidfile', self.config['daemon']['pidfile']),]: + for op, ftochk in [('logfile', self.config.get('log','logfile')), + ('pidfile', self.config.get('daemon', 'pidfile')),]: if not ftochk: continue if isdir(ftochk):