mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-21 03:48:46 +08:00

* feat(alias): support writing to non-ambiguous paths * feat(alias): support extract concurrency * fix(alias): extract url no pass query
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package alias
|
|
|
|
import (
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
|
"github.com/alist-org/alist/v3/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
// Usually one of two
|
|
// driver.RootPath
|
|
// define other
|
|
Paths string `json:"paths" required:"true" type:"text"`
|
|
ProtectSameName bool `json:"protect_same_name" default:"true" required:"false" help:"Protects same-name files from Delete or Rename"`
|
|
DownloadConcurrency int `json:"download_concurrency" default:"0" required:"false" type:"number" help:"Need to enable proxy"`
|
|
DownloadPartSize int `json:"download_part_size" default:"0" type:"number" required:"false" help:"Need to enable proxy. Unit: KB"`
|
|
Writable bool `json:"writable" type:"bool" default:"false"`
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "Alias",
|
|
LocalSort: true,
|
|
NoCache: true,
|
|
NoUpload: false,
|
|
DefaultRoot: "/",
|
|
ProxyRangeOption: true,
|
|
}
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &Alias{
|
|
Addition: Addition{
|
|
ProtectSameName: true,
|
|
},
|
|
}
|
|
})
|
|
}
|