Implemented basic stats functionality and started setting up menu

This commit is contained in:
Dark-Alex-17 committed 2023-08-08 10:50:04 -06:00
1 parent 155675b596
commit 08ecdea1e0
8 files changed
+288 -84

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ impl App {
pub async fn on_tick(&mut self) {
if self.tick_count % self.tick_until_poll == 0 {
self.dispatch(RadarrEvent::GetOverview).await;
self.dispatch(RadarrEvent::GetStatus).await;
}
self.tick_count += 1;
+5 -11
View File
@@ -1,16 +1,10 @@
use chrono::Duration;
use crate::network::radarr::DiskSpace;
#[derive(Default, Debug)]
pub struct RadarrData {
pub free_space: u64,
pub total_space: u64,
}
impl From<&DiskSpace> for RadarrData {
fn from(disk_space: &DiskSpace) -> Self {
RadarrData {
free_space: disk_space.free_space.as_u64().unwrap(),
total_space: disk_space.total_space.as_u64().unwrap()
}
}
pub free_space: u64,
pub total_space: u64,
pub version: String,
}