From 22e26daedf0622d545eab6f2360e531b830639a5 Mon Sep 17 00:00:00 2001 From: cwj3rcb Date: Tue, 17 Feb 2026 16:49:52 -0600 Subject: [PATCH] added reset functionality --- README.md | 5 ++++- src/main.rs | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f17cdc4..5a43919 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,7 @@ All application data is stored in: * D: Enter the download visual queue. * (d on an item in the queue): Remove item from queue. * X: Deletes the local file if the file exists. -* o: Enter offline playback/Attempt to ping the server to join online mode. (Local downloaded database is available during this mode) \ No newline at end of file +* o: Enter offline playback/Attempt to ping the server to join online mode. (Local downloaded database is available during this mode) + +##### Admin Controls +* /\reset"Enter": Deletes the config file and exits the program. Reloading will prompt URL, Username, and Password Input. \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c4ad65c..f37598d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -484,6 +484,15 @@ fn handle_key(app: &mut App, code: KeyCode) { KeyCode::Backspace => { search.input.pop(); return; } KeyCode::Enter => { let term = search.input.trim().to_string(); + // Special command: reset config + exit + if term == r"\reset" { + if let Some(path) = crate::core::config::config_path() { + let _ = std::fs::remove_file(&path); + } + app.should_exit = true; + return; + } + if term.is_empty() { app.search = None; return;