Updated the dashboard page

This commit is contained in:
Connor Johnstone
2026-03-18 11:42:04 -04:00
parent 55607df07b
commit 2314346925
6 changed files with 317 additions and 60 deletions

View File

@@ -102,11 +102,19 @@ pub struct DownloadItem {
// --- Tasks ---
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct TaskProgress {
pub current: u64,
pub total: u64,
pub message: String,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct TaskInfo {
pub id: String,
pub task_type: String,
pub status: String,
pub progress: Option<TaskProgress>,
pub result: Option<String>,
}
@@ -117,10 +125,19 @@ pub struct TaskRef {
// --- Status ---
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct TaggingStatus {
pub needs_tagging: usize,
#[serde(default)]
pub items: Vec<Track>,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct Status {
pub library: LibrarySummary,
pub queue: QueueStatus,
#[serde(default)]
pub tagging: Option<TaggingStatus>,
pub tasks: Vec<TaskInfo>,
}
@@ -137,6 +154,10 @@ pub struct LibrarySummary {
pub struct QueueStatus {
pub pending: usize,
pub downloading: usize,
#[serde(default)]
pub failed: usize,
#[serde(default)]
pub items: Vec<DownloadItem>,
}
// --- API responses ---