From 63d27626e417f0e80b649ca366e79ba92473a6d4 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 18 Jul 2012 23:36:57 +0200 Subject: Database: Support for multiple search roots. Support multiple roots (i.e. scan folders) using the new folder_select() function. Amaximum of 12 dirs can be selected, however the setting (i.e. the entire folder list) cannot be longer than 80 chars. The setting works similar to the autoresume dirs: Directories are seperated by colons, e.g. "/Music:/Podcasts". Default is "/sdcard" on android, "/" on all other targets. Changes are made to the multiple-root logic in tagcache.c. This is to a) provide the logic at all on native targets and b) support more than one root before the scan even starts (until now it was used to add roots during scan due to symlinks). Change-Id: I64992c0678324536e8e64cd4427c8abbd8e8b39e --- apps/settings_list.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/settings_list.c') diff --git a/apps/settings_list.c b/apps/settings_list.c index 5e660b4386..f27c13c4f1 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -316,6 +316,12 @@ static const char graphic_numeric[] = "graphic,numeric"; #endif /* HAVE_RECORDING */ +#if (CONFIG_PLATFORM & PLATFORM_ANDROID) +#define DEFAULT_TAGCACHE_SCAN_PATHS "/sdcard" +#else +#define DEFAULT_TAGCACHE_SCAN_PATHS "/" +#endif + #ifdef HAVE_TOUCHSCREEN static const char* list_pad_formatter(char *buffer, size_t buffer_size, @@ -1355,6 +1361,8 @@ const struct settings_list settings[] = { OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false, "gather runtime data", NULL), + TEXT_SETTING(0, tagcache_scan_paths, "database scan paths", + DEFAULT_TAGCACHE_SCAN_PATHS, NULL, NULL), #endif #if CONFIG_CODEC == SWCODEC -- cgit v1.2.3