[T] Test thumbnailer

This commit is contained in:
Azalea Gui
2023-02-23 13:15:41 -05:00
parent 04233970bd
commit efb13bdd0f
2 changed files with 9 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@
mod macros;
mod generator;
mod utils;
mod thumbnailer;
use std::convert::Infallible;
use std::{env, fs};
+8 -2
View File
@@ -1,9 +1,11 @@
mod generator;
mod macros;
mod utils;
mod thumbnailer;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use generator::*;
use crate::thumbnailer::Thumbnailer;
extern crate pretty_env_logger;
#[macro_use] extern crate log;
@@ -16,5 +18,9 @@ fn main() {
let path: PathBuf = "/data/Anime/1977 Star Wars Collection/01 Star Wars Episode I The Phantom Menace - George Lucas 1999 Eng Subs 720p [H264-mp4].mp4".into();
let mime = gen.get_mime(&path)
.expect("Panic");
info!("mime {mime}")
info!("mime {mime}");
let thumbnailer_path = "/usr/share/thumbnailers/totem.thumbnailer";
let thumbnailer = Thumbnailer::load(Path::new(thumbnailer_path)).unwrap();
info!("thumb {:?}", thumbnailer)
}