fix: mime-type for xz archives (#841)

This commit is contained in:
三咲雅 · Misaki Masa 2024-03-26 21:21:41 +08:00 committed by GitHub
parent f8e0aee311
commit e619a97ee2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 5 deletions

View File

@ -184,7 +184,7 @@ rules = [
{ mime = "application/x-bzip2", fg = "magenta" },
{ mime = "application/x-7z-compressed", fg = "magenta" },
{ mime = "application/x-rar", fg = "magenta" },
{ mime = "application/xz", fg = "magenta" },
{ mime = "application/x-xz", fg = "magenta" },
# Documents
{ mime = "application/doc", fg = "green" },

View File

@ -70,7 +70,7 @@ rules = [
{ mime = "application/x-bzip2", use = [ "extract", "reveal" ] },
{ mime = "application/x-7z-compressed", use = [ "extract", "reveal" ] },
{ mime = "application/x-rar", use = [ "extract", "reveal" ] },
{ mime = "application/xz", use = [ "extract", "reveal" ] },
{ mime = "application/x-xz", use = [ "extract", "reveal" ] },
{ mime = "*", use = [ "open", "reveal" ] },
]
@ -88,8 +88,7 @@ suppress_preload = false
preloaders = [
{ name = "*", cond = "!mime", run = "mime", multi = true, prio = "high" },
# Image
{ mime = "image/vnd.djvu", run = "noop" },
{ mime = "image/*", run = "image" },
{ mime = "image/*", run = "image" },
# Video
{ mime = "video/*", run = "video" },
# PDF
@ -119,7 +118,7 @@ previewers = [
{ mime = "application/x-bzip2", run = "archive" },
{ mime = "application/x-7z-compressed", run = "archive" },
{ mime = "application/x-rar", run = "archive" },
{ mime = "application/xz", run = "archive" },
{ mime = "application/x-xz", run = "archive" },
# Fallback
{ name = "*", run = "file" },
]