Skip to content

Commit

Permalink
feat: support AVIF image preview (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Jul 2, 2024
1 parent 987b1d5 commit 3c88edb
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions yazi-config/preset/yazi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" },
Expand Down
2 changes: 1 addition & 1 deletion yazi-scheduler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod file;
mod ongoing;
mod op;
mod plugin;
mod preload;
mod prework;
mod process;
mod scheduler;
mod task;
Expand Down
2 changes: 1 addition & 1 deletion yazi-scheduler/src/op.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion yazi-scheduler/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit 3c88edb

Please sign in to comment.