[T] Test thumbnailer
This commit is contained in:
@@ -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
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user