diff options
-rw-r--r-- | apps/tagcache.c | 7 | ||||
-rw-r--r-- | apps/tagcache.h | 1 | ||||
-rw-r--r-- | apps/tree.c | 8 |
3 files changed, 16 insertions, 0 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 4812198167..4bcf25bad2 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -3295,6 +3295,13 @@ static void load_ramcache(void) | |||
3295 | 3295 | ||
3296 | cpu_boost(false); | 3296 | cpu_boost(false); |
3297 | } | 3297 | } |
3298 | |||
3299 | void tagcache_unload_ramcache(void) | ||
3300 | { | ||
3301 | stat.ramcache = false; | ||
3302 | /* Just to make sure there is no statefile present. */ | ||
3303 | remove(TAGCACHE_STATEFILE); | ||
3304 | } | ||
3298 | #endif | 3305 | #endif |
3299 | 3306 | ||
3300 | static bool check_all_headers(void) | 3307 | static bool check_all_headers(void) |
diff --git a/apps/tagcache.h b/apps/tagcache.h index d5ce772904..b27d804792 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -155,6 +155,7 @@ bool tagcache_prepare_shutdown(void); | |||
155 | #ifdef HAVE_TC_RAMCACHE | 155 | #ifdef HAVE_TC_RAMCACHE |
156 | bool tagcache_is_ramcache(void); | 156 | bool tagcache_is_ramcache(void); |
157 | bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); | 157 | bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); |
158 | void tagcache_unload_ramcache(void); | ||
158 | #endif | 159 | #endif |
159 | void tagcache_init(void); | 160 | void tagcache_init(void); |
160 | bool tagcache_is_initialized(void); | 161 | bool tagcache_is_initialized(void); |
diff --git a/apps/tree.c b/apps/tree.c index 7b553a5960..1dbe9223b9 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -1365,6 +1365,10 @@ void tree_flush(void) | |||
1365 | tagcache_stop_scan(); | 1365 | tagcache_stop_scan(); |
1366 | playlist_shutdown(); | 1366 | playlist_shutdown(); |
1367 | 1367 | ||
1368 | #ifdef HAVE_TC_RAMCACHE | ||
1369 | tagcache_unload_ramcache(); | ||
1370 | #endif | ||
1371 | |||
1368 | #ifdef HAVE_DIRCACHE | 1372 | #ifdef HAVE_DIRCACHE |
1369 | if (global_settings.dircache) | 1373 | if (global_settings.dircache) |
1370 | { | 1374 | { |
@@ -1387,6 +1391,10 @@ void tree_flush(void) | |||
1387 | 1391 | ||
1388 | void tree_restore(void) | 1392 | void tree_restore(void) |
1389 | { | 1393 | { |
1394 | #ifdef HAVE_EEPROM | ||
1395 | firmware_settings.disk_clean = false; | ||
1396 | #endif | ||
1397 | |||
1390 | #ifdef HAVE_DIRCACHE | 1398 | #ifdef HAVE_DIRCACHE |
1391 | remove(DIRCACHE_FILE); | 1399 | remove(DIRCACHE_FILE); |
1392 | if (global_settings.dircache) | 1400 | if (global_settings.dircache) |