mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-21 18:55:36 +02:00
feat(server): expose via_freedium in capture API (default on)
CaptureBody gains via_freedium: Option<bool>; absent defaults to true. The rearchive handler sets it to false — existing entries should not be silently re-fetched through a mirror.
This commit is contained in:
parent
a926d7cf2d
commit
b33bf8dbd7
1 changed files with 4 additions and 0 deletions
|
|
@ -747,6 +747,8 @@ struct CaptureBody {
|
|||
reader_mode: Option<bool>,
|
||||
cookie_ext_enabled: Option<bool>,
|
||||
modal_closer_enabled: Option<bool>,
|
||||
/// Route through Freedium mirror for WebPage captures. Absent = true (on by default).
|
||||
via_freedium: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
|
|
@ -860,6 +862,7 @@ async fn capture_handler(
|
|||
cookie_ext_enabled: Some(effective_cookie_ext),
|
||||
modal_closer_enabled: Some(effective_modal_closer),
|
||||
reader_mode: body.reader_mode.unwrap_or(false),
|
||||
via_freedium: body.via_freedium.unwrap_or(true),
|
||||
};
|
||||
|
||||
// Spawn background capture.
|
||||
|
|
@ -977,6 +980,7 @@ async fn rearchive_handler(
|
|||
cookie_ext_enabled: None,
|
||||
modal_closer_enabled: None,
|
||||
reader_mode: false,
|
||||
via_freedium: false,
|
||||
};
|
||||
|
||||
let job_uid_bg = job_uid.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue