mirror of https://github.com/Xhofe/alist
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
![]() |
package baidu_netdisk
|
||
|
|
||
|
import (
|
||
|
"github.com/alist-org/alist/v3/internal/driver"
|
||
|
"github.com/alist-org/alist/v3/internal/op"
|
||
|
)
|
||
|
|
||
|
type Addition struct {
|
||
|
RefreshToken string `json:"refresh_token" required:"true"`
|
||
|
driver.RootFolderPath
|
||
|
OrderBy string `json:"order_by" type:"select" options:"name,time,size" default:"name"`
|
||
|
OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
|
||
|
DownloadAPI string `json:"download_api" type:"select" options:"official,crack" default:"official"`
|
||
|
ClientID string `json:"client_id" required:"true" default:"iYCeC9g08h5vuP9UqvPHKKSVrKFXGa1v"`
|
||
|
ClientSecret string `json:"client_secret" required:"true" default:"jXiFMOPVPCWlO2M5CwWQzffpNPaGTRBG"`
|
||
|
}
|
||
|
|
||
|
var config = driver.Config{
|
||
|
Name: "BaiduNetdisk",
|
||
|
LocalSort: false,
|
||
|
OnlyLocal: false,
|
||
|
OnlyProxy: false,
|
||
|
NoCache: false,
|
||
|
NoUpload: false,
|
||
|
NeedMs: false,
|
||
|
DefaultRoot: "root, / or other",
|
||
|
}
|
||
|
|
||
|
func New() driver.Driver {
|
||
|
return &BaiduNetdisk{}
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
op.RegisterDriver(config, New)
|
||
|
}
|