diff --git a/src/assets/play.png b/src/assets/play.png deleted file mode 100644 index 7262fbd..0000000 --- a/src/assets/play.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eed4e1246369a7cb6745fedc39e743d23af78cf564298ca5c7250d63c812cfc0 -size 6616 diff --git a/src/previews/video.rs b/src/previews/video.rs index f29bce7..491f573 100644 --- a/src/previews/video.rs +++ b/src/previews/video.rs @@ -1,13 +1,10 @@ use anyhow::anyhow; -use log::warn; use std::io::Read; use std::path::Path; use std::process::Command; use anyhow::Result; -use crate::common::get_static_dir; - use super::Previewable; pub struct VideoPath<'a>(pub &'a Path); @@ -29,21 +26,9 @@ impl<'a> Previewable for VideoPath<'a> { let duration = String::from_utf8_lossy(&duration_cmd.stdout) .trim() .parse::()?; - let play_button = get_static_dir("assets").map(|d| d.join("play.png")).ok(); let outfile = tempfile::Builder::new().suffix(".webp").tempfile()?; let thumbnail_cmd = Command::new("ffmpeg") .args(["-i", &self.0.to_string_lossy()]) - .args(if let Some(play_button) = play_button { - vec![ - "-i".to_string(), - play_button.to_string_lossy().to_string(), - "-filter_complex".to_string(), - "[0:v][1:v]overlay=(W-w)/2:(H-h)/2".to_string(), - ] - } else { - warn!("Could not find play button to overlay for video thumbnail!"); - vec![] - }) .args(["-vframes", "1"]) .args(["-ss", &(300f64.min(duration / 4.0)).to_string()]) .arg(&*outfile.path().to_string_lossy())