feat(lanzou): support login with account (close #4880 in #4885)

This commit is contained in:
foxxorcat
2023-08-01 19:44:57 +08:00
committed by GitHub
parent 9f08353d31
commit c9ea9bce81
5 changed files with 114 additions and 33 deletions

View File

@ -6,8 +6,13 @@ import (
)
type Addition struct {
Type string `json:"type" type:"select" options:"cookie,url" default:"cookie"`
Cookie string `json:"cookie" required:"true" help:"about 15 days valid, ignore if shareUrl is used"`
Type string `json:"type" type:"select" options:"account,cookie,url" default:"cookie"`
Account string `json:"account"`
Password string `json:"password"`
Cookie string `json:"cookie" help:"about 15 days valid, ignore if shareUrl is used"`
driver.RootID
SharePassword string `json:"share_password"`
BaseUrl string `json:"baseUrl" required:"true" default:"https://pc.woozooo.com" help:"basic URL for file operation"`
@ -19,6 +24,10 @@ func (a *Addition) IsCookie() bool {
return a.Type == "cookie"
}
func (a *Addition) IsAccount() bool {
return a.Type == "account"
}
var config = driver.Config{
Name: "Lanzou",
LocalSort: true,