diff --git a/drivers/pikpak/driver.go b/drivers/pikpak/driver.go index 88a4803c..c86a8b86 100644 --- a/drivers/pikpak/driver.go +++ b/drivers/pikpak/driver.go @@ -66,7 +66,7 @@ func (d *PikPak) Link(ctx context.Context, file model.Obj, args model.LinkArgs) link := model.Link{ URL: resp.WebContentLink, } - if len(resp.Medias) > 0 && resp.Medias[0].Link.Url != "" { + if !d.DisableMediaLink && len(resp.Medias) > 0 && resp.Medias[0].Link.Url != "" { log.Debugln("use media link") link.URL = resp.Medias[0].Link.Url } diff --git a/drivers/pikpak/meta.go b/drivers/pikpak/meta.go index 683f0ce8..3512c44b 100644 --- a/drivers/pikpak/meta.go +++ b/drivers/pikpak/meta.go @@ -7,8 +7,9 @@ import ( type Addition struct { driver.RootID - Username string `json:"username" required:"true"` - Password string `json:"password" required:"true"` + Username string `json:"username" required:"true"` + Password string `json:"password" required:"true"` + DisableMediaLink bool `json:"disable_media_link"` } var config = driver.Config{