fix: resolve queue management and metadata fetch bugs

- Reset isRemoving state in DeleteConfirmationModal on open and close to prevent UI freeze
- Filter sidebar queue count to exclude completed downloads
- Return fully resolved URL from backend metadata fetch to avoid 403s on one-time tokens
This commit is contained in:
NimBold
2026-06-21 14:57:21 +03:30
parent 3660ceb47a
commit d535bdac8f
5 changed files with 14 additions and 5 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ use std::time::{Duration, Instant};
#[derive(Serialize, TS)]
#[ts(export, export_to = "../../src/bindings/")]
pub struct MetadataResponse {
url: String,
filename: String,
size: String,
#[ts(type = "number")]
@@ -849,7 +850,7 @@ async fn fetch_metadata(url: String, user_agent: Option<String>, username: Optio
}
}
Ok(MetadataResponse { filename, size: size_str, size_bytes })
Ok(MetadataResponse { url: current_url, filename, size: size_str, size_bytes })
}
const MEDIA_METADATA_CACHE_TTL: Duration = Duration::from_secs(60);