mirror of https://github.com/Xhofe/alist
feat(local): add show hidden config (#2087)
parent
02df3759df
commit
da7e17aa38
|
@ -68,7 +68,7 @@ func (d *Local) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([
|
||||||
}
|
}
|
||||||
var files []model.Obj
|
var files []model.Obj
|
||||||
for _, f := range rawFiles {
|
for _, f := range rawFiles {
|
||||||
if strings.HasPrefix(f.Name(), ".") {
|
if !d.ShowHidden && strings.HasPrefix(f.Name(), ".") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
thumb := ""
|
thumb := ""
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
type Addition struct {
|
type Addition struct {
|
||||||
driver.RootPath
|
driver.RootPath
|
||||||
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
|
Thumbnail bool `json:"thumbnail" required:"true" help:"enable thumbnail"`
|
||||||
|
ShowHidden bool `json:"show_hidden" default:"true" required:"false" help:"show hidden directories and files"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var config = driver.Config{
|
var config = driver.Config{
|
||||||
|
|
Loading…
Reference in New Issue