Record download checksums
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::{path::PathBuf, time::SystemTime};
|
||||
|
||||
use ely_domain::{DownloadEntry, DownloadId, UrlText};
|
||||
use ely_domain::{DownloadChecksum, DownloadEntry, DownloadId, UrlText};
|
||||
|
||||
use crate::CoreError;
|
||||
|
||||
@@ -70,6 +70,15 @@ impl BrowserCore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn record_download_checksum(
|
||||
&mut self,
|
||||
download_id: &DownloadId,
|
||||
checksum: DownloadChecksum,
|
||||
) -> Result<(), CoreError> {
|
||||
self.download_entry_mut(download_id)?.record_checksum(checksum)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn download_target_file_path(
|
||||
&self,
|
||||
download_id: &DownloadId,
|
||||
|
||||
Reference in New Issue
Block a user