feat: support AVIF image preview (#1249)

This commit is contained in:
三咲雅 · Misaki Masa 2024-07-02 22:44:08 +08:00 committed by GitHub
parent 987b1d5c49
commit 3c88edbc4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ fetchers = [
]
preloaders = [
# Image
{ mime = "image/{heic,jxl,svg+xml}", run = "magick" },
{ mime = "image/{avif,heic,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" },
# Video
{ mime = "video/*", run = "video" },
@ -105,7 +105,7 @@ previewers = [
# JSON
{ mime = "application/{json,x-ndjson}", run = "json" },
# Image
{ mime = "image/{heic,jxl,svg+xml}", run = "magick" },
{ mime = "image/{avif,heic,jxl,svg+xml}", run = "magick" },
{ mime = "image/*", run = "image" },
# Video
{ mime = "video/*", run = "video" },

View File

@ -4,7 +4,7 @@ mod file;
mod ongoing;
mod op;
mod plugin;
mod preload;
mod prework;
mod process;
mod scheduler;
mod task;

View File

@ -1,4 +1,4 @@
use crate::{file::FileOp, plugin::PluginOp, preload::PreworkOp};
use crate::{file::FileOp, plugin::PluginOp, prework::PreworkOp};
#[derive(Debug)]
pub enum TaskOp {

View File

@ -9,7 +9,7 @@ use yazi_dds::Pump;
use yazi_shared::{event::Data, fs::{unique_path, Url}, Throttle};
use super::{Ongoing, TaskProg, TaskStage};
use crate::{file::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash}, plugin::{Plugin, PluginOpEntry}, preload::{Prework, PreworkOpFetch, PreworkOpLoad, PreworkOpSize}, process::{Process, ProcessOpBg, ProcessOpBlock, ProcessOpOrphan}, TaskKind, TaskOp, HIGH, LOW, NORMAL};
use crate::{file::{File, FileOpDelete, FileOpLink, FileOpPaste, FileOpTrash}, plugin::{Plugin, PluginOpEntry}, prework::{Prework, PreworkOpFetch, PreworkOpLoad, PreworkOpSize}, process::{Process, ProcessOpBg, ProcessOpBlock, ProcessOpOrphan}, TaskKind, TaskOp, HIGH, LOW, NORMAL};
pub struct Scheduler {
pub file: Arc<File>,