[T] Test thumbnailers

This commit is contained in:
Azalea Gui
2023-02-23 13:57:47 -05:00
parent ac4fe214d2
commit b4a3991d0e
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -5,7 +5,7 @@ mod thumbnailer;
use std::path::{Path, PathBuf};
use generator::*;
use crate::thumbnailer::Thumbnailer;
use crate::thumbnailer::{Thumbnailer, Thumbnailers};
extern crate pretty_env_logger;
#[macro_use] extern crate log;
@@ -25,4 +25,7 @@ fn main() {
info!("thumb {:?}", thumbnailer);
info!("check {:?}", thumbnailer.check("audio/x-mp3"));
thumbnailer.gen(path.to_str().unwrap(), "/tmp/test.png", 256).expect("Generation failed");
let ts = Thumbnailers::load_all().unwrap();
info!("Video thumbnailer: {:?}", ts.find("audio/x-mp3"))
}
+1 -1
View File
@@ -1,5 +1,5 @@
use std::collections::HashSet;
use std::{fs, process};
use std::fs;
use std::path::Path;
use std::process::Command;
use anyhow::{bail, Result};