From e99691495ae098275ba7a3029960d2156ed28537 Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 14 Nov 2010 19:15:52 +0100 Subject: album art cache fixes --- conf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'conf.c') diff --git a/conf.c b/conf.c index b86e0836..c59cc92d 100644 --- a/conf.c +++ b/conf.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "conf.h" static DB_conf_item_t *conf_items; @@ -133,6 +134,12 @@ conf_get_int (const char *key, int def) { return v ? atoi (v) : def; } +int64_t +conf_get_int64 (const char *key, int64_t def) { + const char *v = conf_get_str (key, NULL); + return v ? atoll (v) : def; +} + DB_conf_item_t * conf_find (const char *group, DB_conf_item_t *prev) { int l = strlen (group); @@ -185,6 +192,13 @@ conf_set_int (const char *key, int val) { conf_set_str (key, s); } +void +conf_set_int64 (const char *key, int64_t val) { + char s[20]; + snprintf (s, sizeof (s), PRId64, val); + conf_set_str (key, s); +} + void conf_set_float (const char *key, float val) { char s[10]; -- cgit v1.2.3