feat(terabox): add terabox driver (close #2825 close #2678 #2849)

This commit is contained in:
Code2qing
2022-12-31 16:44:20 +08:00
committed by GitHub
parent fbf3fb825b
commit 1c8d895fc0
5 changed files with 524 additions and 0 deletions

25
drivers/terabox/meta.go Normal file
View File

@ -0,0 +1,25 @@
package terbox
import (
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/op"
)
type Addition struct {
driver.RootPath
Cookie string `json:"cookie" required:"true"`
DownloadAPI string `json:"download_api" type:"select" options:"official,crack" default:"official"`
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"`
}
var config = driver.Config{
Name: "Terabox",
DefaultRoot: "/",
}
func init() {
op.RegisterDriver(func() driver.Driver {
return &Terabox{}
})
}