[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 macros;
mod generator; mod generator;
mod utils; mod utils;
mod thumbnailer;
use std::convert::Infallible; use std::convert::Infallible;
use std::{env, fs}; use std::{env, fs};
+8 -2
View File
@@ -1,9 +1,11 @@
mod generator; mod generator;
mod macros; mod macros;
mod utils; mod utils;
mod thumbnailer;
use std::path::PathBuf; use std::path::{Path, PathBuf};
use generator::*; use generator::*;
use crate::thumbnailer::Thumbnailer;
extern crate pretty_env_logger; extern crate pretty_env_logger;
#[macro_use] extern crate log; #[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 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) let mime = gen.get_mime(&path)
.expect("Panic"); .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)
} }