2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-20 11:21:14 +00:00

Rename thumbnail_args to variant_args

This commit is contained in:
asonix 2024-03-31 16:23:34 -05:00
parent 74885f2932
commit 056b96d0ad
2 changed files with 8 additions and 9 deletions

View file

@ -52,7 +52,7 @@ pub(crate) async fn generate<S: Store + 'static>(
state: &State<S>,
format: InputProcessableFormat,
variant: String,
thumbnail_args: Vec<String>,
variant_args: Vec<String>,
original_details: &Details,
hash: Hash,
) -> Result<(Details, Arc<str>), Error> {
@ -82,7 +82,7 @@ pub(crate) async fn generate<S: Store + 'static>(
state,
format,
variant.clone(),
thumbnail_args,
variant_args,
original_details,
hash.clone(),
)
@ -167,7 +167,7 @@ async fn process<S: Store + 'static>(
state: &State<S>,
output_format: InputProcessableFormat,
variant: String,
thumbnail_args: Vec<String>,
variant_args: Vec<String>,
original_details: &Details,
hash: Hash,
) -> Result<(Details, Arc<str>), Error> {
@ -193,7 +193,7 @@ async fn process<S: Store + 'static>(
let stream = state.store.to_stream(&identifier, None, None).await?;
let bytes =
crate::magick::process_image_command(state, thumbnail_args, input_format, format, quality)
crate::magick::process_image_command(state, variant_args, input_format, format, quality)
.await?
.drive_with_stream(stream)
.into_bytes_stream()

View file

@ -783,9 +783,9 @@ fn prepare_process(
.parse::<InputProcessableFormat>()
.map_err(|_| UploadError::UnsupportedProcessExtension)?;
let (variant, thumbnail_args) = self::processor::build_chain(&operations, &format.to_string())?;
let (variant, variant_args) = self::processor::build_chain(&operations, &format.to_string())?;
Ok((format, variant, thumbnail_args))
Ok((format, variant, variant_args))
}
#[tracing::instrument(name = "Fetching derived details", skip(state))]
@ -852,8 +852,7 @@ async fn process<S: Store + 'static>(
) -> Result<HttpResponse, Error> {
let alias = proxy_alias_from_query(source.into(), &state).await?;
let (format, variant, thumbnail_args) =
prepare_process(&state.config, operations, ext.as_str())?;
let (format, variant, variant_args) = prepare_process(&state.config, operations, ext.as_str())?;
let (hash, alias, not_found) = if let Some(hash) = state.repo.hash(&alias).await? {
(hash, alias, false)
@ -892,7 +891,7 @@ async fn process<S: Store + 'static>(
&state,
format,
variant,
thumbnail_args,
variant_args,
&original_details,
hash,
)