summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang14
-rw-r--r--apps/settings.h9
-rw-r--r--apps/settings_list.c5
-rw-r--r--apps/tagcache.c6
4 files changed, 30 insertions, 4 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index c41033ec81..b326d5fec0 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -16669,3 +16669,17 @@
16669 *: "Remove Queued Tracks?" 16669 *: "Remove Queued Tracks?"
16670 </voice> 16670 </voice>
16671</phrase> 16671</phrase>
16672<phrase>
16673 id: LANG_QUICK_IGNORE_DIRACHE
16674 desc: in Settings
16675 user: core
16676 <source>
16677 *: "Quick (Ignore Directory Cache)"
16678 </source>
16679 <dest>
16680 *: "Quick (Ignore Directory Cache)"
16681 </dest>
16682 <voice>
16683 *: "Quick (Ignore Directory Cache)"
16684 </voice>
16685</phrase>
diff --git a/apps/settings.h b/apps/settings.h
index 09a01b40a1..ce29e020f7 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -136,6 +136,13 @@ enum
136}; 136};
137#endif 137#endif
138 138
139enum
140{
141 TAGCACHE_RAM_OFF = 0,
142 TAGCACHE_RAM_ON = 1,
143 TAGCACHE_RAM_QUICK = 2
144};
145
139/* dir filter options */ 146/* dir filter options */
140/* Note: Any new filter modes need to be added before NUM_FILTER_MODES. 147/* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
141 * Any new rockbox browse filter modes (accessible through the menu) 148 * Any new rockbox browse filter modes (accessible through the menu)
@@ -576,7 +583,7 @@ struct user_settings
576#endif 583#endif
577#ifdef HAVE_TAGCACHE 584#ifdef HAVE_TAGCACHE
578#ifdef HAVE_TC_RAMCACHE 585#ifdef HAVE_TC_RAMCACHE
579 bool tagcache_ram; /* load tagcache to ram? */ 586 int tagcache_ram; /* load tagcache to ram: 1=on, 2=quick (ignore dircache) */
580#endif 587#endif
581 bool tagcache_autoupdate; /* automatically keep tagcache in sync? */ 588 bool tagcache_autoupdate; /* automatically keep tagcache in sync? */
582 bool autoresume_enable; /* enable auto-resume feature? */ 589 bool autoresume_enable; /* enable auto-resume feature? */
diff --git a/apps/settings_list.c b/apps/settings_list.c
index bc3708bfba..7bdb3522c0 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1813,7 +1813,10 @@ const struct settings_list settings[] = {
1813 1813
1814#ifdef HAVE_TAGCACHE 1814#ifdef HAVE_TAGCACHE
1815#ifdef HAVE_TC_RAMCACHE 1815#ifdef HAVE_TC_RAMCACHE
1816 OFFON_SETTING(F_BANFROMQS,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL), 1816 CHOICE_SETTING(F_BANFROMQS, tagcache_ram, LANG_TAGCACHE_RAM,
1817 0, "tagcache_ram", "off,on,quick",
1818 NULL, 3,
1819 ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_QUICK_IGNORE_DIRACHE)),
1817#endif 1820#endif
1818 OFFON_SETTING(F_BANFROMQS, tagcache_autoupdate, LANG_TAGCACHE_AUTOUPDATE, false, 1821 OFFON_SETTING(F_BANFROMQS, tagcache_autoupdate, LANG_TAGCACHE_AUTOUPDATE, false,
1819 "tagcache_autoupdate", NULL), 1822 "tagcache_autoupdate", NULL),
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 90f7e01a2f..9463d7c865 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -800,7 +800,8 @@ static long find_entry_ram(const char *filename)
800 struct dircache_fileref dcfref; 800 struct dircache_fileref dcfref;
801 801
802 /* Check if tagcache is loaded into ram. */ 802 /* Check if tagcache is loaded into ram. */
803 if (!tc_stat.ramcache) 803 if (!tc_stat.ramcache
804 || global_settings.tagcache_ram != TAGCACHE_RAM_ON)
804 return -1; 805 return -1;
805 806
806 if (dircache_search(DCS_CACHED_PATH | DCS_UPDATE_FILEREF, &dcfref, 807 if (dircache_search(DCS_CACHED_PATH | DCS_UPDATE_FILEREF, &dcfref,
@@ -5247,7 +5248,8 @@ static void tagcache_thread(void)
5247 if (!tc_stat.ramcache && global_settings.tagcache_ram) 5248 if (!tc_stat.ramcache && global_settings.tagcache_ram)
5248 { 5249 {
5249 load_ramcache(); 5250 load_ramcache();
5250 check_file_refs(global_settings.tagcache_autoupdate); 5251 if (global_settings.tagcache_ram == TAGCACHE_RAM_ON)
5252 check_file_refs(global_settings.tagcache_autoupdate);
5251 if (tc_stat.ramcache && global_settings.tagcache_autoupdate) 5253 if (tc_stat.ramcache && global_settings.tagcache_autoupdate)
5252 tagcache_build(); 5254 tagcache_build();
5253 } 5255 }