mirror of https://github.com/Xhofe/alist
🎨 move default text types
parent
1ab6b4e201
commit
22665aa19a
|
@ -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",
|
||||
},
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue