X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/2eee4b0cd743865445a5023e8c10467cdc9b350e..2563dc1f46fad1640e2472151a9f1cf918f841b9:/lib/configuration.c?ds=inline diff --git a/lib/configuration.c b/lib/configuration.c index 241d101..2e75ecb 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -952,6 +952,7 @@ static const struct conf conf[] = { { C(noticed_history), &type_integer, validate_positive }, { C(password), &type_string, validate_any }, { C(player), &type_stringlist_accum, validate_player }, + { C(playlist_max) , &type_integer, validate_positive }, { C(plugins), &type_string_accum, validate_isdir }, { C(prefsync), &type_integer, validate_positive }, { C(queue_pad), &type_integer, validate_positive }, @@ -1198,6 +1199,7 @@ static struct config *config_default(void) { c->reminder_interval = 600; /* 10m */ c->new_bias_age = 7 * 86400; /* 1 week */ c->new_bias = 9000000; /* 100 times the base weight */ + c->playlist_max = INT_MAX; /* effectively no limit */ /* Default stopwords */ if(config_set(&cs, (int)NDEFAULT_STOPWORDS, (char **)default_stopwords)) exit(1); @@ -1213,7 +1215,7 @@ static struct config *config_default(void) { return c; } -static char *get_file(struct config *c, const char *name) { +char *config_get_file2(struct config *c, const char *name) { char *s; byte_xasprintf(&s, "%s/%s", c->home, name); @@ -1411,7 +1413,7 @@ char *config_usersysconf(const struct passwd *pw) { } char *config_get_file(const char *name) { - return get_file(config, name); + return config_get_file2(config, name); } /*