🎨 move default text types

pull/548/head
微凉 2021-12-20 17:24:49 +08:00
parent 1ab6b4e201
commit 22665aa19a
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import (
"github.com/Xhofe/alist/model"
log "github.com/sirupsen/logrus"
"gorm.io/gorm"
"strings"
)
func InitSettings() {
@ -61,7 +62,7 @@ func InitSettings() {
},
{
Key: "text types",
Value: "txt,htm,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,yml,go,sh,c,cpp,h,hpp,tsx,vtt,srt,ass",
Value: strings.Join(conf.TextTypes, ","),
Type: "string",
Description: "text type extensions",
},

View File

@ -29,7 +29,9 @@ var (
)
var (
TextTypes = []string{"txt", "go", "md"}
TextTypes = []string{"txt", "htm", "html", "xml", "java", "properties", "sql",
"js", "md", "json", "conf", "ini", "vue", "php", "py", "bat", "gitignore", "yml",
"go", "sh", "c", "cpp", "h", "hpp", "tsx", "vtt", "srt", "ass"}
OfficeTypes = []string{"doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"}
VideoTypes = []string{"mp4", "mkv", "avi", "mov", "rmvb", "webm"}
AudioTypes = []string{"mp3", "flac", "ogg", "m4a"}