diff options
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/main.c b/apps/main.c index 838a4859d2..4249fd0b8b 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -60,8 +60,10 @@ | |||
60 | #include "misc.h" | 60 | #include "misc.h" |
61 | #include "database.h" | 61 | #include "database.h" |
62 | #include "dircache.h" | 62 | #include "dircache.h" |
63 | #ifdef HAVE_TAGCACHE | ||
63 | #include "tagcache.h" | 64 | #include "tagcache.h" |
64 | #include "tagtree.h" | 65 | #include "tagtree.h" |
66 | #endif | ||
65 | #include "lang.h" | 67 | #include "lang.h" |
66 | #include "string.h" | 68 | #include "string.h" |
67 | #include "splash.h" | 69 | #include "splash.h" |
@@ -169,6 +171,7 @@ int init_dircache(bool preinit) | |||
169 | #endif | 171 | #endif |
170 | } | 172 | } |
171 | 173 | ||
174 | #ifdef HAVE_TAGCACHE | ||
172 | void init_tagcache(void) | 175 | void init_tagcache(void) |
173 | { | 176 | { |
174 | bool clear = false; | 177 | bool clear = false; |
@@ -204,6 +207,7 @@ void init_tagcache(void) | |||
204 | show_logo(); | 207 | show_logo(); |
205 | } | 208 | } |
206 | } | 209 | } |
210 | #endif | ||
207 | 211 | ||
208 | #ifdef SIMULATOR | 212 | #ifdef SIMULATOR |
209 | 213 | ||
@@ -230,7 +234,9 @@ void init(void) | |||
230 | settings_apply(); | 234 | settings_apply(); |
231 | init_dircache(true); | 235 | init_dircache(true); |
232 | init_dircache(false); | 236 | init_dircache(false); |
237 | #ifdef HAVE_TAGCACHE | ||
233 | init_tagcache(); | 238 | init_tagcache(); |
239 | #endif | ||
234 | sleep(HZ/2); | 240 | sleep(HZ/2); |
235 | tree_init(); | 241 | tree_init(); |
236 | playlist_init(); | 242 | playlist_init(); |
@@ -436,16 +442,19 @@ void init(void) | |||
436 | #endif | 442 | #endif |
437 | settings_load(SETTINGS_ALL); | 443 | settings_load(SETTINGS_ALL); |
438 | 444 | ||
439 | |||
440 | if (init_dircache(true) < 0) | 445 | if (init_dircache(true) < 0) |
441 | { | 446 | { |
447 | #ifdef HAVE_TAGCACHE | ||
442 | remove(TAGCACHE_STATEFILE); | 448 | remove(TAGCACHE_STATEFILE); |
449 | #endif | ||
443 | } | 450 | } |
444 | 451 | ||
445 | gui_sync_wps_init(); | 452 | gui_sync_wps_init(); |
446 | settings_apply(); | 453 | settings_apply(); |
447 | init_dircache(false); | 454 | init_dircache(false); |
455 | #ifdef HAVE_TAGCACHE | ||
448 | init_tagcache(); | 456 | init_tagcache(); |
457 | #endif | ||
449 | 458 | ||
450 | #ifdef HAVE_EEPROM_SETTINGS | 459 | #ifdef HAVE_EEPROM_SETTINGS |
451 | if (firmware_settings.initialized) | 460 | if (firmware_settings.initialized) |