Added mechanism to skip updates in a module

* This is useful in modules where HTTP API calls are made. Updating them
  every second is expensive, network intensive and can cause rate limits
  to be hit
* Added get_name() function to modules for easier debug statements
This commit is contained in:
2025-06-14 17:33:24 -07:00
parent e8ab11eff9
commit 7245914da8
11 changed files with 92 additions and 3 deletions

View File

@@ -18,6 +18,12 @@ impl fmt::Display for TemperatureUnits {
}
}
#[derive(Debug,PartialEq,Eq,Copy,Clone)]
pub enum UpdateResult {
Update,
Skip
}
// --------------------
// Application options
// --------------------
@@ -29,4 +35,5 @@ pub struct AppOptions {
pub music_progress: bool,
pub debug: bool,
pub debug_modules: bool,
pub debug_update: bool,
}