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" | 	"github.com/Xhofe/alist/model" | ||||||
| 	log "github.com/sirupsen/logrus" | 	log "github.com/sirupsen/logrus" | ||||||
| 	"gorm.io/gorm" | 	"gorm.io/gorm" | ||||||
|  | 	"strings" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func InitSettings() { | func InitSettings() { | ||||||
|  | @ -61,7 +62,7 @@ func InitSettings() { | ||||||
| 		}, | 		}, | ||||||
| 		{ | 		{ | ||||||
| 			Key:         "text types", | 			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", | 			Type:        "string", | ||||||
| 			Description: "text type extensions", | 			Description: "text type extensions", | ||||||
| 		}, | 		}, | ||||||
|  |  | ||||||
|  | @ -29,7 +29,9 @@ var ( | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| 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"} | 	OfficeTypes = []string{"doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf"} | ||||||
| 	VideoTypes  = []string{"mp4", "mkv", "avi", "mov", "rmvb", "webm"} | 	VideoTypes  = []string{"mp4", "mkv", "avi", "mov", "rmvb", "webm"} | ||||||
| 	AudioTypes  = []string{"mp3", "flac", "ogg", "m4a"} | 	AudioTypes  = []string{"mp3", "flac", "ogg", "m4a"} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 微凉
						微凉