1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add arc thumbnail support as part of #10

This commit is contained in:
NG (Graham)
2025-05-24 23:56:48 -04:00
parent 59612e6aa3
commit 2607903f7b
13 changed files with 310 additions and 20 deletions

View File

@@ -34,7 +34,7 @@ impl rc_factory::VehicleFactoryAdapter for Factory {
impl Factory {
pub async fn from_config(conf: &crate::persist::FactoryConfig) -> Result<Self, Box<dyn std::error::Error + 'static>> {
Ok(match &conf.adapter {
crate::persist::AdapterSettings::Arc(x) => Self::Arc(rc_factory::arc::ArcAdapter::init(&x.uri, x.show_expired).await?),
crate::persist::AdapterSettings::Arc(x) => Self::Arc(rc_factory::arc::ArcAdapter::init(&x.uri, x.show_expired, x.override_cdn.clone()).await?),
crate::persist::AdapterSettings::None => Self::None,
})
}

View File

@@ -23,6 +23,9 @@ pub struct ArcFactorySettings {
pub uri: String,
#[serde(default = "default_true")]
pub show_expired: bool,
/// should probably end with /roboshop/arc/Live/
#[serde(default)]
pub override_cdn: Option<String>,
}
fn default_true() -> bool {