diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-07-18 23:36:57 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-07-30 21:20:51 +0200 |
commit | 63d27626e417f0e80b649ca366e79ba92473a6d4 (patch) | |
tree | b52d8bafc7d47279af5b763876121b63790324d6 /apps/settings_list.c | |
parent | 0a645d212c226da8f85b23125fb192fb94829628 (diff) | |
download | rockbox-63d27626e417f0e80b649ca366e79ba92473a6d4.tar.gz rockbox-63d27626e417f0e80b649ca366e79ba92473a6d4.zip |
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
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r-- | apps/settings_list.c | 8 |
1 files changed, 8 insertions, 0 deletions
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"; | |||
316 | 316 | ||
317 | #endif /* HAVE_RECORDING */ | 317 | #endif /* HAVE_RECORDING */ |
318 | 318 | ||
319 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | ||
320 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/sdcard" | ||
321 | #else | ||
322 | #define DEFAULT_TAGCACHE_SCAN_PATHS "/" | ||
323 | #endif | ||
324 | |||
319 | #ifdef HAVE_TOUCHSCREEN | 325 | #ifdef HAVE_TOUCHSCREEN |
320 | 326 | ||
321 | static const char* list_pad_formatter(char *buffer, size_t buffer_size, | 327 | static const char* list_pad_formatter(char *buffer, size_t buffer_size, |
@@ -1355,6 +1361,8 @@ const struct settings_list settings[] = { | |||
1355 | 1361 | ||
1356 | OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false, | 1362 | OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false, |
1357 | "gather runtime data", NULL), | 1363 | "gather runtime data", NULL), |
1364 | TEXT_SETTING(0, tagcache_scan_paths, "database scan paths", | ||
1365 | DEFAULT_TAGCACHE_SCAN_PATHS, NULL, NULL), | ||
1358 | #endif | 1366 | #endif |
1359 | 1367 | ||
1360 | #if CONFIG_CODEC == SWCODEC | 1368 | #if CONFIG_CODEC == SWCODEC |