feat(launcher): configurable .tmp cache cleanup in cfg panel
- launcher_cfg_local_actions.svelte: add "Cache Maintenance" block (native-only, gated by is_native && cache_root); number input for max age in hours, "Clean Now" button with status feedback - launcher_background_sync.svelte: read cleanup_tmp_max_age_hours from events_loc.launcher store (default 24h) instead of hardcoded 1440 minutes; setting persists across sessions via persisted store Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,11 +108,12 @@
|
||||
setTimeout(() => refresh_presentation_data(), 3000);
|
||||
setTimeout(() => refresh_presenter_data(), 5000);
|
||||
|
||||
// Clean up stale .tmp files (interrupted downloads) older than 24h.
|
||||
// Run once at startup — sufficient for conference day usage.
|
||||
// Clean up stale .tmp files (interrupted downloads) on startup.
|
||||
// Age threshold is user-configurable (cfg → General → Cache Maintenance), default 24h.
|
||||
const cache_root = $ae_loc.local_file_cache_path;
|
||||
if ($ae_loc.is_native && cache_root) {
|
||||
cleanup_tmp_files({ cache_root }).then((result) => {
|
||||
const max_age_hours = $events_loc.launcher.cleanup_tmp_max_age_hours ?? 24;
|
||||
cleanup_tmp_files({ cache_root, max_age_minutes: max_age_hours * 60 }).then((result) => {
|
||||
if (log_lvl) console.log('Sync: .tmp cleanup complete.', result);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user