From f02b9fa526ed3c360fc2a3b3f6a646f3cd0db0b0 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 11 Jan 2021 10:44:35 +0100 Subject: Add feature to mark a source entry as manual download This patch adds a feature where a source entry in a package can be marked for manual download. This gives us the ability to mask downloads which are hidden behind cruel JavaScript bullshit bloat where a `curl` cannot access the remote file. Signed-off-by: Matthias Beyer Signed-off-by: Matthias Beyer --- src/source/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/source') diff --git a/src/source/mod.rs b/src/source/mod.rs index 295d7a9..fac7dce 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -84,6 +84,10 @@ impl SourceEntry { self.package_source.url() } + pub fn download_manually(&self) -> bool { + *self.package_source.download_manually() + } + pub async fn remove_file(&self) -> Result<()> { let p = self.source_file_path(); tokio::fs::remove_file(&p).await?; -- cgit v1.2.3