Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

feat: notify when bdix state is already set

Samir Hossainsd64e06ed2f51
diff --git a/src/tui/app.rs b/src/tui/app.rs
index 94714e1..b789ed1 100644
--- a/src/tui/app.rs
+++ b/src/tui/app.rs
@@ -1842,7 +1842,24 @@ impl App {
}
if lower_query == "/enable-bdix" || lower_query == "/disable-bdix" {
- self.state.bdix_enabled = lower_query == "/enable-bdix";
+ let enable_req = lower_query == "/enable-bdix";
+
+ if self.state.bdix_enabled == enable_req {
+ self.state.search_query.clear();
+ self.state.input_mode = InputMode::Normal;
+ self.state.notify(
+ NotificationKind::Info,
+ "BDIX Providers",
+ if enable_req {
+ "Already Enabled"
+ } else {
+ "Already Disabled"
+ },
+ );
+ return None;
+ }
+
+ self.state.bdix_enabled = enable_req;
self.persist_config();
self.state.search_query.clear();
self.state.input_mode = InputMode::Normal;