From abab8ade39c947e34c1f8c8eb8dc26e0d939d9e4 Mon Sep 17 00:00:00 2001 From: zengge99 <83830807+zengge99@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:07:34 +0800 Subject: [PATCH] Update driver.go --- drivers/quark_share/driver.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/quark_share/driver.go b/drivers/quark_share/driver.go index ce5e7a040bb..621adb036b2 100644 --- a/drivers/quark_share/driver.go +++ b/drivers/quark_share/driver.go @@ -8,6 +8,7 @@ import ( //"io" "net/http" "time" + "fmt" "github.com/alist-org/alist/v3/drivers/base" "github.com/alist-org/alist/v3/internal/driver" @@ -39,11 +40,21 @@ func (d *QuarkShare) GetAddition() driver.Additional { func (d *QuarkShare) Init(ctx context.Context) error { _, err := d.request("/config", http.MethodGet, nil, nil) - d.getStoken() + stoken := d.getStoken() + if stoken == "" { + fmt.Println("刷新夸克分享令牌失败") + } else { + fmt.Println("刷新夸克分享令牌成功:", stoken) + } d.linkMap = make(map[string]*model.Link) d.cron = cron.NewCron(time.Hour * 2) d.cron.Do(func() { - d.getStoken() + stoken := d.getStoken() + if stoken == "" { + fmt.Println("刷新夸克分享令牌失败") + } else { + fmt.Println("刷新夸克分享令牌成功:", stoken) + } }) return err }