mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-28 04:21:12 +00:00
Rename thumbnail_args to variant_args
This commit is contained in:
parent
74885f2932
commit
056b96d0ad
2 changed files with 8 additions and 9 deletions
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue