aboutsummaryrefslogtreecommitdiff
path: root/transcoder/src/thumbnail.rs
diff options
context:
space:
mode:
Diffstat (limited to 'transcoder/src/thumbnail.rs')
-rw-r--r--transcoder/src/thumbnail.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/transcoder/src/thumbnail.rs b/transcoder/src/thumbnail.rs
index 9661fd0..c8bfb1c 100644
--- a/transcoder/src/thumbnail.rs
+++ b/transcoder/src/thumbnail.rs
@@ -5,7 +5,7 @@ use std::{path::Path, process::Stdio};
use tokio::{io::copy, process::Command};
pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePath> {
- Ok(async_cache_file(
+ async_cache_file(
&["thumb", path.to_str().unwrap(), &format!("{time}")],
move |mut output| async move {
let _permit = LOCAL_IMAGE_TRANSCODING_TASKS.acquire().await?;
@@ -13,12 +13,12 @@ pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePat
let mut proc = Command::new("ffmpeg")
.stdout(Stdio::piped())
- .args(&["-ss", &format!("{time}")])
- .args(&["-f", "matroska", "-i", path.to_str().unwrap()])
- .args(&["-frames:v", "1"])
- .args(&["-c:v", "qoi"])
- .args(&["-f", "image2"])
- .args(&["-update", "1"])
+ .args(["-ss", &format!("{time}")])
+ .args(["-f", "matroska", "-i", path.to_str().unwrap()])
+ .args(["-frames:v", "1"])
+ .args(["-c:v", "qoi"])
+ .args(["-f", "image2"])
+ .args(["-update", "1"])
.arg("pipe:1")
.spawn()?;
@@ -30,5 +30,5 @@ pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePat
Ok(())
},
)
- .await?)
+ .await
}