Skip to content

Commit

Permalink
fix(189pc): fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Nov 1, 2022
1 parent f95ab6e commit 7bfa587
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion drivers/115/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package _115

import (
"context"
"os"

driver115 "github.com/SheltonZhu/115driver/pkg/driver"
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/pkg/utils"
"github.com/pkg/errors"
"os"
)

type Pan115 struct {
Expand Down
2 changes: 1 addition & 1 deletion drivers/189pc/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Addition struct {
Type string `json:"type" type:"select" options:"personal,family" default:"personal"`
FamilyID string `json:"family_id"`
RapidUpload bool `json:"rapid_upload"`
NonuseOrc bool `json:"nonuse_orc"`
NoUseOcr bool `json:"no_use_ocr"`
}

var config = driver.Config{
Expand Down
6 changes: 3 additions & 3 deletions drivers/189pc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (y *Yun189PC) getFiles(ctx context.Context, fileId string) ([]model.Obj, er

func (y *Yun189PC) login() (err error) {
// 初始化登陆所需参数
if y.loginParam == nil || !y.NonuseOrc {
if y.loginParam == nil || !y.NoUseOcr {
if err = y.initLoginParam(); err != nil {
// 验证码也通过错误返回
return err
Expand All @@ -198,7 +198,7 @@ func (y *Yun189PC) login() (err error) {
// 销毁登陆参数
y.loginParam = nil
// 遇到错误,重新加载登陆参数
if err != nil && y.NonuseOrc {
if err != nil && y.NoUseOcr {
if err1 := y.initLoginParam(); err1 != nil {
err = fmt.Errorf("err1: %s \nerr2: %s", err, err1)
}
Expand Down Expand Up @@ -315,7 +315,7 @@ func (y *Yun189PC) initLoginParam() error {
return fmt.Errorf("failed to obtain verification code")
}
if imgRes.Size() > 20 {
if setting.GetStr(conf.OcrApi) != "" && !y.NonuseOrc {
if setting.GetStr(conf.OcrApi) != "" && !y.NoUseOcr {
vRes, err := base.RestyClient.R().
SetMultipartField("image", "validateCode.png", "image/png", bytes.NewReader(imgRes.Body())).
Post(setting.GetStr(conf.OcrApi))
Expand Down

0 comments on commit 7bfa587

Please sign in to comment.